From b1a784917d9e82dc90c6c9ab75a0d62db71ee376 Mon Sep 17 00:00:00 2001 From: Mojca Miklavec Date: Wed, 8 Jan 2014 11:38:48 +0000 Subject: context: a fix for compatibility with ruby 2.0 git-svn-id: svn://tug.org/texlive/trunk@32605 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 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 -- cgit v1.2.3