Skip to content

Commit

Permalink
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions spec/regression/GH-1963_Array_product_coercion_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
describe "GH-1963: Array#product" do
it "coerces Array-like objects that only define method_missing" do
o = Object.new
def o.method_missing(name, *args)
[2]
end
if RUBY_VERSION >= "1.9"
describe "GH-1963: Array#product" do
it "coerces Array-like objects that only define method_missing" do
o = Object.new
def o.method_missing(name, *args)
[2]
end

expect([1].product(o)).to eq([[1,2]])
expect([1].product(o)).to eq([[1,2]])
end
end
end

0 comments on commit 2281c70

Please sign in to comment.