Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
$ ruby -ve 'p [1,2].repeated_permutation(3).to_a'
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
[[1, 1, 1], [1, 1, 2], [1, 2, 1], [1, 2, 2], [2, 1, 1], [2, 1, 2], [2, 2, 1], [2, 2, 2]]
$ jruby --1.9 -e 'p [1,2].repeated_permutation(3).to_a'
[]
A patch is attached.
FYI, I found this bug by executing CRuby's test/ruby/test_array.rb ![]()
In fact, it DOES run, though it emits many errors/failures because of
JRuby's lack of support for $SAFE, full continuation, auto-synchronized
array, etc.
–
Yusuke Endoh <mame@tsg.ne.jp>
The rubyspec test suite fails on this as well: rubyspec/core/array/repeated_permutation_spec.rb
ruby-doc includes this as one of the examples for repeated_permutation.