From 293c0c38477176364d8f5ea638c27d4bc3b37211 Mon Sep 17 00:00:00 2001 From: Mojca Miklavec Date: Wed, 8 Jan 2014 11:49:30 +0000 Subject: context: a fix for compatibility with ruby 2.0 (in branch2013) git-svn-id: svn://tug.org/texlive/branches/branch2013@32606 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/context/ruby/base/switch.rb | 10 +++++----- 1 file 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 -- cgit v1.2.3