Backport #7972

Regex Posix space class seems location-sensitive in Ruby 2.0.0-p0

Added by J Daniel Ashton about 1 year ago. Updated about 1 year ago.

[ruby-core:52955]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga

Description

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/

Associated revisions

Revision 39953
Added by Tomoyuki Chikanaga about 1 year ago

merge revision(s) 39547: [Backport #7972] [Backport #7974]

* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
  v5.13.3 [Bug#7972] [Bug#7974]

History

#1 Updated by Yui NARUSE about 1 year ago

  • Status changed from Open to Closed

Fixed at r39547, thanks!

#2 Updated by Tomoyuki Chikanaga about 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Status changed from Closed to Assigned
  • Assignee set to Tomoyuki Chikanaga

#3 Updated by Tomoyuki Chikanaga about 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39953.
J Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 39547: [Backport #7972] [Backport #7974]

* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
  v5.13.3 [Bug#7972] [Bug#7974]

Also available in: Atom PDF