Array#replace causes StackOverflowError at $SAFE level 4
--------------------------------------------------------

                 Key: JRUBY-1168
                 URL: http://jira.codehaus.org/browse/JRUBY-1168
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0RC3
         Environment: Solaris 10, jruby 2007-06-25 rev 3876, java 1.5
            Reporter: Daniel Berger


At $SAFE level 4 the Array#replace method raise a StackOverflowError. This 
simple script demonstrates it:
{noformat}
a = [1,2,3]
$SAFE=4
a.replace([4,5])
{noformat}
Running that snippet causes this:
{noformat}
Exception in thread "main" java.lang.StackOverflowError
        at org.jruby.RubyException.initialize(RubyException.java:154)
        at org.jruby.RubyExceptionInvokerinitializexx1.call(Unknown Source)
        at 
org.jruby.runtime.callback.InvocationCallback.execute(InvocationCallback.java:49)
        at 
org.jruby.internal.runtime.methods.FullFunctionCallbackMethod.internalCall(FullFunctionCallbackMethod.java:78)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
        at org.jruby.RubyObject.callMethod(RubyObject.java:575)
        at org.jruby.RubyObject.callMethod(RubyObject.java:449)
        at org.jruby.RubyClass.newInstance(RubyClass.java:291)
        at org.jruby.RubyClassInvokernewInstancexx1.call(Unknown Source)
        at 
org.jruby.runtime.callback.InvocationCallback.execute(InvocationCallback.java:49)
        at 
org.jruby.internal.runtime.methods.FullFunctionCallbackMethod.internalCall(FullFunctionCallbackMethod.java:78)
        ...
{noformat}
And so on.

-- 
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

Reply via email to