Regular expression bug
----------------------
Key: JRUBY-1128
URL: http://jira.codehaus.org/browse/JRUBY-1128
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.0.0RC3
Environment: Solaris on x86
Reporter: Seung Jun
The "/x" switch seems buggy with JRuby.
% jruby --version
ruby 1.8.5 (2007-06-07 rev 3841) [x86-jruby1.0]
% ruby --version
ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-solaris2.10]
% jruby
line = '[20070426 09:49:09.661 EDT (FooBar)'
line =~ /^\[(\d{4})(\d\d)(\d\d)\ (\d\d:\d\d:\d\d\.\d{3}\ [A-Z]+)/x
puts $4
^D
nil <--- this is wrong!
% ruby
line = '[20070426 09:49:09.661 EDT (FooBar)'
line =~ /^\[(\d{4})(\d\d)(\d\d)\ (\d\d:\d\d:\d\d\.\d{3}\ [A-Z]+)/x
puts $4
^D
09:49:09.661 EDT <--- this is correct.
Please look into this problem.
Thank you.
--
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