Actions
Bug #3599
closedIncorrect Regexp inspect for ASCII-8BIT String
Description
=begin
irb(main):001:0> a = Regexp.new("\xF1\xF2\xF3".force_encoding('ASCII-8BIT'))
=> /\xF1/
irb(main):002:0> puts a.inspect
/\xF1/
=> nil
irb(main):003:0> "\xF0\xF1".force_encoding('ASCII-8BIT') =~ a
=> nil
irb(main):004:0> a.source
=> "\xF1\xF2\xF3"
irb(main):005:0> "\xF0\xF1\xF2\xF3".force_encoding('ASCII-8BIT') =~ a
=> 1
=end
Actions
Like0
Like0Like0