Strange each_slice/with_index combo exception
---------------------------------------------

                 Key: JRUBY-5412
                 URL: http://jira.codehaus.org/browse/JRUBY-5412
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.6RC1
            Reporter: Radoslav Peev


x.rb:
[1, 2, 3, 4].each.with_index { |v, i|
        p [v, i]
}

>"C:\jruby-1.6.0.RC1\bin\jruby.exe" --1.9 "x.rb"
[1, 0]
[2, 1]
[3, 2]
[4, 3]
>Exit code: 0

x1.rb:
[1, 2, 3, 4].each_slice(2).with_index { |v, i|
        p [v, i]
}

>"C:\jruby-1.6.0.RC1\bin\jruby.exe" --1.9 "x1.rb"
org/jruby/RubyEnumerator.java:410:in `with_index19': wrong number of arguments 
(1 for 0) (ArgumentError)
        from x1.rb:1:in `(root)'
>Exit code: 1



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