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

From: agathe.begault@...
Date: 2015-06-26 16:13:54 UTC
List: ruby-core #69747
Issue #11311 has been updated by Agathe Begault.


~~~ruby
'SKYPE'.scan(/[^aeiouyAEIOUY\W]/i) #returns ["P"] instead of ["S", "K", "P"]
'SKYPE'.scan(/[^aeiouyAEIOUY\W]/) #returns ["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


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

* 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