summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby/patterns.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-12-28 07:27:12 +0000
committermurphy <murphy@rubychan.de>2009-12-28 07:27:12 +0000
commit432aeb74d5a49e6f0efd1063113cef099c93aef6 (patch)
treef300ae05c2418721ea188ca1acc763cff06e71b7 /lib/coderay/scanners/ruby/patterns.rb
parent1982b2bf7e7bfa333838cf2f3e7613c00d2a67c3 (diff)
downloadcoderay-432aeb74d5a49e6f0efd1063113cef099c93aef6.tar.gz
Copying changes and fixes for 0.9.0rc3 from terminal-encoder branch over to trunk.
Diffstat (limited to 'lib/coderay/scanners/ruby/patterns.rb')
-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 51ceba3..fc6ce56 100644
--- a/lib/coderay/scanners/ruby/patterns.rb
+++ b/lib/coderay/scanners/ruby/patterns.rb
@@ -142,7 +142,7 @@ module Scanners
| #{CHARACTER}
)
/x
- VALUE_EXPECTING_KEYWORDS = WordList.new.add(%w[
+ KEYWORDS_EXPECTING_VALUE = WordList.new.add(%w[
and end in or unless begin
defined? ensure redo super until
break do next rescue then
@@ -182,7 +182,7 @@ module Scanners
STRING_PATTERN = Hash.new do |h, k|
delim, interpreted = *k
- delim_pattern = Regexp.escape(delim)
+ delim_pattern = Regexp.escape(delim.dup) # dup: Fix for x86_64-linux 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)