Project

General

Profile

Actions

Bug #3599

closed

Incorrect Regexp inspect for ASCII-8BIT String

Added by phasis68 (Heesob Park) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.3dev (2010-07-22 trunk 28707) [i686-linux]
Backport:
[ruby-core:31431]

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

Also available in: Atom PDF

Like0
Like0Like0