diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-01-08 11:49:30 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-01-08 11:49:30 +0000 |
commit | 293c0c38477176364d8f5ea638c27d4bc3b37211 (patch) | |
tree | ce2b919292b1b925913937555ef823e28ecfb38a | |
parent | 98963354ab3f31914b66070b90f314849c70df36 (diff) |
context: a fix for compatibility with ruby 2.0 (in branch2013)branch2013
git-svn-id: svn://tug.org/texlive/branches/branch2013@32606 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/scripts/context/ruby/base/switch.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/context/ruby/base/switch.rb b/Master/texmf-dist/scripts/context/ruby/base/switch.rb index 79613dcd0f9..c7408cf5348 100644 --- a/Master/texmf-dist/scripts/context/ruby/base/switch.rb +++ b/Master/texmf-dist/scripts/context/ruby/base/switch.rb @@ -485,20 +485,20 @@ class CommandLine private - def dirtyvalue(value) + def dirtyvalue(value) # \xFF suddenly doesn't work any longer if value then value.gsub(/([\"\'])(.*?)\1/) do - $2.gsub(/\s+/o, "\xFF") + $2.gsub(/\s+/o, "\0xFF") end else '' end end - def cleanvalue(value) + def cleanvalue(value) # \xFF suddenly doesn't work any longer if value then # value.sub(/^([\"\'])(.*?)\1$/) { $2.gsub(/\xFF/o, ' ') } - value.gsub(/\xFF/o, ' ') + value.gsub(/\0xFF/o, ' ') else '' end @@ -567,7 +567,7 @@ class CommandLine def locateseries(series, value) - series.each do |key| + series.each_char do |key| # was .each but there is no alias to each_char any longer locatesingle(key,cleanvalue(value)) end |