lib/coderay/encoders/json.rb in coderay-1.0.0.846rc2 vs lib/coderay/encoders/json.rb in coderay-1.0.0.864rc3
- old
+ new
@@ -19,11 +19,11 @@
begin
require 'json'
rescue LoadError
begin
- require 'rubygems'
- gem "json"
+ require 'rubygems' unless defined? Gem
+ gem 'json'
require 'json'
rescue LoadError
$stderr.puts "The JSON encoder needs the JSON library.\n" \
"Please gem install json."
raise