Skip to content

Commit c144bfd

Browse files
committed
cleanup JSON encoder gem loading
1 parent 2c63d09 commit c144bfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/coderay/encoders/json.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class JSON < Encoder
2121
require 'json'
2222
rescue LoadError
2323
begin
24-
require 'rubygems'
25-
gem "json"
24+
require 'rubygems' unless defined? Gem
25+
gem 'json'
2626
require 'json'
2727
rescue LoadError
2828
$stderr.puts "The JSON encoder needs the JSON library.\n" \

0 commit comments

Comments
 (0)