[ruby-core:69746] [Ruby trunk - Bug #11311] [Open] STRING::Scan method badly interpret i option - Ruby 2.1.*

From: agathe.begault@...
Date: 2015-06-26 16:10:29 UTC
List: ruby-core #69746
Issue #11311 has been reported by Agathe Begault.

----------------------------------------
Bug #11311: STRING::Scan method badly interpret i option - Ruby 2.1.* 
https://bugs.ruby-lang.org/issues/11311

* Author: Agathe Begault
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 2.1.6
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
~~~ruby
'SKYPE'.scan(/[^aeiouyAEIOUY\W]/i) #returns ["P"] instead of ["S", "K", "P"]
~~~
Tested on Ruby 2.1.3 / 2.1.5 / 2.1.6
regexp i option: case insensitive

https://github.com/ruby/ruby/blame/trunk/string.c#L7681



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

In This Thread

Prev Next