Issue Type: Bug Bug
Affects Versions: JRuby 1.6.7
Assignee: Unassigned
Attachments: jruby_shuffle.rb
Components: Java Integration
Created: 05/Jun/12 9:15 AM
Description:

If I try java.util.Collections.shuffle on a ruby array, I get a strange result.

I attached an example code for it

Actual result:

Ruby array

Original: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Shuffled: [0, 3, 6, 7, 7, 7, 7, 9, 9, 10, 10]

Java array

Original: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Shuffled: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Environment: jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_31) [linux-amd64-java]
Project: JRuby
Priority: Major Major
Reporter: Gabor Garami
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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