From c144bfd8918d00e1e1588829f248a88c0561e673 Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Mon, 19 Sep 2011 01:51:30 +0200 Subject: cleanup JSON encoder gem loading --- lib/coderay/encoders/json.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/coderay/encoders/json.rb') diff --git a/lib/coderay/encoders/json.rb b/lib/coderay/encoders/json.rb index 0a95397..a9e40dc 100644 --- a/lib/coderay/encoders/json.rb +++ b/lib/coderay/encoders/json.rb @@ -21,8 +21,8 @@ module Encoders 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" \ -- cgit v1.2.1