summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-12-30 07:16:09 +0000
committermurphy <murphy@rubychan.de>2009-12-30 07:16:09 +0000
commitb510e92787bd0c2ff7b77e933adc2a15ba862026 (patch)
tree8949234e0c1702074be633446de672025f16cfdc /lib/coderay/scanners/ruby
parentd3fa14e8438a4bce18c141e1011059f7f5a125fc (diff)
downloadcoderay-b510e92787bd0c2ff7b77e933adc2a15ba862026.tar.gz
Cleanups.
Diffstat (limited to 'lib/coderay/scanners/ruby')
-rw-r--r--lib/coderay/scanners/ruby/patterns.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb
index fc6ce56..576beda 100644
--- a/lib/coderay/scanners/ruby/patterns.rb
+++ b/lib/coderay/scanners/ruby/patterns.rb
@@ -182,7 +182,7 @@ module Scanners
STRING_PATTERN = Hash.new do |h, k|
delim, interpreted = *k
- delim_pattern = Regexp.escape(delim.dup) # dup: Fix for x86_64-linux Ruby
+ delim_pattern = Regexp.escape(delim.dup) # dup: workaround for old Ruby
if closing_paren = CLOSING_PAREN[delim]
delim_pattern = delim_pattern[0..-1] if defined? JRUBY_VERSION # JRuby fix
delim_pattern << Regexp.escape(closing_paren)
@@ -207,7 +207,7 @@ module Scanners
HEREDOC_PATTERN = Hash.new do |h, k|
delim, interpreted, indented = *k
- delim_pattern = Regexp.escape(delim.dup)
+ delim_pattern = Regexp.escape(delim.dup) # dup: workaround for old Ruby
delim_pattern = / \n #{ '(?>[\ \t]*)' if indented } #{ Regexp.new delim_pattern } $ /x
h[k] =
if interpreted