Regex string interpolation breaks unicode properties
----------------------------------------------------
Key: JRUBY-5622
URL: http://jira.codehaus.org/browse/JRUBY-5622
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6
Environment: osx snow leopard
Reporter: Xavier Shay
Assignee: Thomas E Enebo
String interpolation into regexes appears to break unicode property names.
This script works under MRI 1.9.2.
{{# encoding: UTF-8
# The following two scenarios work
puts /[\p{L}]/u
puts /[#{"\\p{L}"}]/u
# this one raises an exception
# RegexpError: (RegexpError) invalid character property name {L}: /\p{L}/
b = "\\p{L}"
puts /[#{b}]/u}}
This is currently preventing datamapper from running on jruby 1.9, because it
uses this technique in dm-validations to validate email addresses.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email