[#67346] Future of test suites for Ruby — Charles Oliver Nutter <headius@...>

I'll try to be brief so we can discuss all this. tl;dr: RubySpec is

19 messages 2015/01/05

[ruby-core:67612] [ruby-trunk - Bug #10670] char-class matching same character with different encodings raises exception

From: naruse@...
Date: 2015-01-16 02:05:48 UTC
List: ruby-core #67612
Issue #10670 has been updated by Yui NARUSE.

Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE

ruby_2_2 r49264 merged revision(s) 49058.

----------------------------------------
Bug #10670: char-class matching same character with different encodings raises exception
https://bugs.ruby-lang.org/issues/10670#change-51031

* Author: Gregg Kellogg
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE
----------------------------------------
The following simple script illustrates the issue:

~~~ruby
ESCAPE_PLAIN = /\A[\x5B]*\z/m.freeze

0x5B.chr(::Encoding::UTF_8) =~ ESCAPE_PLAIN
0x5B.chr =~ ESCAPE_PLAIN
~~~

`\x5B` is `']'`, run all lines above and get _in `=~': empty char-class: /\A[\x5B]*\z/m (RegexpError)_

Comment out either the first or second usage and the error goes away.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next