[1.9] String#tr! and String#tr_s! crash in some cases
-----------------------------------------------------
Key: JRUBY-4464
URL: http://jira.codehaus.org/browse/JRUBY-4464
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules, Ruby 1.9, RubySpec
Reporter: Vladimir Sizikov
{noformat}
# jruby --1.9 -e "p 'hello'.tr!('','yb')"
RubyString.java:6165:in `trTrans19': java.lang.ArrayIndexOutOfBoundsException: 0
from RubyString.java:5971:in `tr_bang19'
from org/jruby/RubyString$i_method_2_0$RUBYINVOKER$tr_bang19.gen:-1:in
`call'
from CachingCallSite.java:329:in `cacheAndCall'
from CachingCallSite.java:188:in `call'
from CallTwoArgNode.java:59:in `interpret'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:104:in `interpret'
from RootNode.java:129:in `interpret'
from Ruby.java:657:in `runInterpreter'
from Ruby.java:553:in `runNormally'
from Ruby.java:395:in `runFromMain'
from Main.java:272:in `run'
from Main.java:117:in `run'
from Main.java:97:in `main'
#jruby --1.9 -e "p 'hello'.tr_s!('','yb')"
RubyString.java:6165:in `trTrans19': java.lang.ArrayIndexOutOfBoundsException: 0
from RubyString.java:6427:in `tr_s_bang19'
from
org/jruby/RubyString$i_method_2_0$RUBYINVOKER$tr_s_bang19.gen:-1:in `call'
from CachingCallSite.java:329:in `cacheAndCall'
from CachingCallSite.java:188:in `call'
from CallTwoArgNode.java:59:in `interpret'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:104:in `interpret'
from RootNode.java:129:in `interpret'
from Ruby.java:657:in `runInterpreter'
from Ruby.java:553:in `runNormally'
from Ruby.java:395:in `runFromMain'
from Main.java:272:in `run'
from Main.java:117:in `run'
from Main.java:97:in `main'
{noformat}
--
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