Dave Thomas wrote: > > Before I submit this to Ruby-bugs, am I doing something silly here: > > % cat t.rb > MAGIC=159.chr > "x".sub!(/#{MAGIC}(.)(.)/s, 'y') > > % ruby t.rb > t.rb:2: unmatched ): /Y(.)(.)/ (RegexpError) > > % ruby -v -e 'p $-K' > ruby 1.6.2 (2001-01-18) [i686-linux] > "NONE" > > It happens whenever MAGIC has a value between 128 and 159. > > Dave Perhaps this is the same thing? ~/tests/ruby:>ruby -e 'p /#{127.chr}/s' /\177/s ~/tests/ruby:>ruby -e 'p /#{128.chr}/s' -e:1: premature end of regular expression: /?/ (RegexpError)