Issue #7972 has been updated by naruse (Yui NARUSE).

Status changed from Open to Closed

Fixed at r39547, thanks!
----------------------------------------
Bug #7972: Regex Posix space class seems location-sensitive in Ruby 2.0.0-p0
https://bugs.ruby-lang.org/issues/7972#change-37487

Author: jdashton (J Daniel Ashton)
Status: Closed
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin11.4.2]


This regex 

    /[^[:space:]\d\-,\.]/ 

matches as expected in 1.9.3.  But in 2.0.0-p0 this regex fails to match unless the space class is moved later in the class.  For example, both of the following work as expected:

    /[^\d[:space:]\-,\.]/
    /[^\d\-,\.[:space:]]/

See http://stackoverflow.com/questions/15076507/regex-slightly-different-in-ruby-2/



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