From 84d08ed441be2ca9f097c7ee2a571f950df961e1 Mon Sep 17 00:00:00 2001 From: murphy Date: Thu, 25 Dec 2008 02:39:39 +0000 Subject: JRuby fixes. --- lib/coderay/scanners/ruby/patterns.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/coderay/scanners/ruby/patterns.rb') diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb index 75937b7..c18789b 100644 --- a/lib/coderay/scanners/ruby/patterns.rb +++ b/lib/coderay/scanners/ruby/patterns.rb @@ -166,13 +166,14 @@ module Scanners { } ] ] - CLOSING_PAREN.values.each { |o| o.freeze } # debug, if I try to change it with << + CLOSING_PAREN.each { |k,v| k.freeze; v.freeze } # debug, if I try to change it with << OPENING_PAREN = CLOSING_PAREN.invert STRING_PATTERN = Hash.new { |h, k| delim, interpreted = *k - delim_pattern = Regexp.escape(delim.dup) + delim_pattern = Regexp.escape(delim) if closing_paren = CLOSING_PAREN[delim] + delim_pattern = delim_pattern[0..-1] if defined? JRUBY_VERSION # JRuby fix delim_pattern << Regexp.escape(closing_paren) end -- cgit v1.2.1