summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2008-12-25 02:39:39 +0000
committermurphy <murphy@rubychan.de>2008-12-25 02:39:39 +0000
commit84d08ed441be2ca9f097c7ee2a571f950df961e1 (patch)
treeea8259b6fdb7decff535726708dcda9fd03d48f2 /lib/coderay/scanners/ruby
parent79a313948f2277cf0f2e238d5765a71fee03e089 (diff)
downloadcoderay-84d08ed441be2ca9f097c7ee2a571f950df961e1.tar.gz
JRuby fixes.
Diffstat (limited to 'lib/coderay/scanners/ruby')
-rw-r--r--lib/coderay/scanners/ruby/patterns.rb5
1 files changed, 3 insertions, 2 deletions
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