We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e6fcf42 + 80954e9 commit ff74833Copy full SHA for ff74833
spec/java_integration/interfaces/collection_spec.rb
@@ -0,0 +1,16 @@
1
+require File.dirname(__FILE__) + "/../spec_helper"
2
+
3
+describe "Classes that implement Collection" do
4
+ before do
5
+ @first_item = 'first'
6
+ @second_item = 'second'
7
+ @items = [@first_item, @second_item]
8
+ @collection = Java::JavaUtil::ArrayList.new(@items)
9
+ end
10
11
+ it "should support multiple assignment" do
12
+ first_item, second_item = @collection
13
+ first_item.should eql @first_item
14
+ second_item.should eql @second_item
15
16
+end
src/jruby/java/java_ext/java.util.rb
@@ -29,6 +29,7 @@ def to_a
29
# first
30
toArray.to_a
31
end
32
+ alias_method :to_ary, :to_a
33
34
35
module java::util::Enumeration
0 commit comments