diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-01-08 11:38:48 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-01-08 11:38:48 +0000 |
commit | b1a784917d9e82dc90c6c9ab75a0d62db71ee376 (patch) | |
tree | eedf99eaf15fc67977bd21981a5b0d2785621df2 | |
parent | 4afad845c96537474b8d73773638bed72db60d5a (diff) |
context: a fix for compatibility with ruby 2.0
git-svn-id: svn://tug.org/texlive/trunk@32605 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 e3875201861..73f53208281 100644 --- a/Master/texmf-dist/scripts/context/ruby/base/switch.rb +++ b/Master/texmf-dist/scripts/context/ruby/base/switch.rb @@ -487,20 +487,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 @@ -569,7 +569,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 |