diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-09-18 19:57:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-09-18 19:57:00 +0200 |
commit | 55b9041a2de87b34eb3fa158ae4952f484b6e9fa (patch) | |
tree | ba97b0853c32fc9c06a92b2f99d8d85c7febbf64 /scripts | |
parent | 14cebb2c0ae1d04c4cb494f7daafd708c206f485 (diff) | |
download | context-55b9041a2de87b34eb3fa158ae4952f484b6e9fa.tar.gz |
beta 2013.09.18 19:57
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/ruby/base/switch.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/context/ruby/base/switch.rb b/scripts/context/ruby/base/switch.rb index e1d2283a4..73f532082 100644 --- a/scripts/context/ruby/base/switch.rb +++ b/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, "\xFFFC") + $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(/\xFFFC/o, ' ') } - value.gsub(/\xFFFC/o, ' ') + # value.sub(/^([\"\'])(.*?)\1$/) { $2.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 |