Skip to content

Commit

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

expect(Array(o)).to eq([])
expect(Array(o)).to eq([])
end
end
end

0 comments on commit 2032d76

Please sign in to comment.