diff options
author | Marius <mariausol@gmail.com> | 2013-09-18 22:00:25 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-09-18 22:00:25 +0300 |
commit | fe4a089f9636b53d65de1bbf09a27bbfd0a538f8 (patch) | |
tree | 285b76b2492ca759f6a29b94bc3a37ebcd5e640a /scripts | |
parent | c81421a932e43f45d2c7ef7ed6a38411ea53a66c (diff) | |
download | context-fe4a089f9636b53d65de1bbf09a27bbfd0a538f8.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 |