ArrayIndexOutOfBoundsException when evaluating regex with trailing \b
---------------------------------------------------------------------
Key: JRUBY-2089
URL: http://jira.codehaus.org/browse/JRUBY-2089
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.1RC1
Environment: OS X Leopard
Reporter: Dean Wampler
Assignee: Thomas E Enebo
Attachments: jruby_stack_dump.txt
$ jruby -v
ruby 1.8.6 (2008-01-07 rev 5512) [i386-jruby1.1RC1]
This script works fine with MRI, but throws a AIOBE when JRuby is used:
#!/usr/bin/env jruby
ma = %w[bar bar= foo_bar foo_bar= baz baz= foo_baz foo_baz=]
p "This re is fine: /bar.*/"
gma = ma.grep(/bar.*/)
p "This re is fine: /bar.*$/"
gma = ma.grep(/bar.*$/)
p "This re fails: /bar.*\\b/"
gma = ma.grep(/bar.*\b/) # exception raised here
p "start: #{ma.inspect}"
p "finish: #{gma.inspect}"
The stack trace is attached
--
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