# a patch for compatibility with ruby 2.0
# fixed upstream in version 2013.10.20 07:09
# http://www.ntg.nl/pipermail/ntg-context/2013/075016.html
# http://tug.org/svn/texlive?view=revision&revision=32605
--- runfiles/texmf-dist/scripts/context/ruby/base/switch.rb.orig
+++ runfiles/texmf-dist/scripts/context/ruby/base/switch.rb
# copyright : PRAGMA Advanced Document Engineering
@@ -488,7 +490,7 @@ class CommandLine
value.gsub(/([\"\'])(.*?)\1/) do
- $2.gsub(/\s+/o, "\xFF")
+ $2.gsub(/\s+/o, "\0xFF")
@@ -498,7 +500,7 @@ class CommandLine
# value.sub(/^([\"\'])(.*?)\1$/) { $2.gsub(/\xFF/o, ' ') }
- value.gsub(/\xFF/o, ' ')
+ value.gsub(/\0xFF/o, ' ')
@@ -567,7 +569,7 @@ class CommandLine
def locateseries(series, value)
+ series.each_char do |key|
locatesingle(key,cleanvalue(value))