This line of code used to work in Ruby 1.9.3, but it fails in Ruby 2.0:
@data[:VR] = line[1].strip.gsub( /\xB6|\xFF/, '' )
The error I get is:
Test.rb:75: invalid multibyte escape: /\xB6|\xFF/ (SyntaxError)
invalid multibyte escape: /\xB6|\xFF/
invalid multibyte escape: /[\xB6\xFF@"'].+/
I assume I'm supposed to be changing some encoding somewhere, or perhaps
using "\u0080" or something like that, but I'm a bit stumped at the
moment. Any ideas?
···
--
Posted via http://www.ruby-forum.com/.