-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex Symbol missing #3603
Comments
@digininja Is this reported against JRuby 1.7.23 or JRuby 9k? I see it working on master and I suspect it worked on the last released version (it would be great if you could check so you can also see if the Punct differences have also been fixed). On 1.7.x we support 1.8.7 and 1.9.3 and Symbol did not exist as a character class back then so we also do not support it. Recently we did update our jcodings library for 1.7.x so I am hoping your Punct differences will be correct. |
Also, those are available only in unicode, so check your 'coding' magic comment and ENCODING. |
I'm running the latest jruby from rvm
I'll see if I can get a newer version and try it with that. @lopex I'm not doing anything special with encoding, can you point me at an example of what I should be setting? It works find in MRI. |
It might work on MRI if JRuby differs when selecting encoding based on system locales. Can you reassure if that regexp works with //u modifier and/or ENCODING is indeed utf-8. ? |
This does appear to be a thing in Ruby 1.9.3, and ignored in 1.8.7:
And it seems like joni updates in JRuby 1.7 have fixed it:
So...all good :-) |
I'm not at a PC to test this at they moment but are you saying that the
|
Yes, try the fresh release of 1.7.24 and it should work.
|
OK thanks. I was running the latest from rvm so I'll have to have to force
|
I've got the following regex to detect symbols:
It works fine in Ruby but fails with this error in JRuby
I tried to detect this and use Punct instead but as it is a syntax error I can't get it with a being/rescue.
I've also noticed that Punct in JRuby contains different characters to what are contained in the Ruby version.
So, why is Symbol missing and why is there a difference in the Punct config?
The text was updated successfully, but these errors were encountered: