From 277db0fcac531d9f4776bafd05f8630a45520cac Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 8 Jul 2011 16:30:07 +0000 Subject: minor support fixes for some Ruby engines and versions --- lib/coderay/encoders/json.rb | 2 +- lib/coderay/helpers/plugin.rb | 2 +- lib/coderay/scanners/php.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/coderay') diff --git a/lib/coderay/encoders/json.rb b/lib/coderay/encoders/json.rb index 9da3238..ccad554 100644 --- a/lib/coderay/encoders/json.rb +++ b/lib/coderay/encoders/json.rb @@ -22,7 +22,7 @@ module Encoders rescue LoadError begin require 'rubygems' - gem "json#{'-jruby' if defined? JRUBY_VERSION}" + gem "json" require 'json' rescue LoadError $stderr.puts "The JSON encoder needs the JSON library.\n" \ diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb index b0dda0c..8a8e149 100644 --- a/lib/coderay/helpers/plugin.rb +++ b/lib/coderay/helpers/plugin.rb @@ -271,7 +271,7 @@ module CodeRay def aliases plugin_host.load_plugin_map - plugin_host.plugin_hash.inject [] do |aliases, (key, value)| + plugin_host.plugin_hash.inject [] do |aliases, (key, _)| aliases << key if plugin_host[key] == self aliases end diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb index ea9a8c8..8ec1196 100644 --- a/lib/coderay/scanners/php.rb +++ b/lib/coderay/scanners/php.rb @@ -354,7 +354,7 @@ module Scanners elsif match = scan(/<<<(?:(#{RE::IDENTIFIER})|"(#{RE::IDENTIFIER})"|'(#{RE::IDENTIFIER})')/o) encoder.begin_group :string - warn 'heredoc in heredoc?' if heredoc_delimiter + # warn 'heredoc in heredoc?' if heredoc_delimiter heredoc_delimiter = Regexp.escape(self[1] || self[2] || self[3]) encoder.text_token match, :delimiter states.push self[3] ? :sqstring : :dqstring -- cgit v1.2.1