Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add spec for array coercion #1708

Merged
merged 1 commit into from

2 participants

@tduehr

test for #1673

@enebo enebo merged commit 6327e80 into jruby:jruby-1_7
@enebo enebo added this to the JRuby 1.7.13 milestone
@tduehr tduehr deleted the tduehr:to_a branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 2, 2014
  1. @tduehr

    add spec for array coercion

    tduehr authored
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/java_integration/types/array_spec.rb
View
6 spec/java_integration/types/array_spec.rb
@@ -928,4 +928,10 @@ def blah()
it "descends from java.lang.Object" do
ArrayJavaProxy.superclass.should == java.lang.Object
end
+
+ it "to_a coerces nested Java arrays to Ruby arrays" do
+ rar = [[1],[2]].to_java(Java::byte[]).to_a
+ rar.first.should == [1]
+ rar.first.first.should be_kind_of(Fixnum)
+ end
end
Something went wrong with that request. Please try again.