class C
def foo(pattern=nil, &block)
p [pattern, block_given?]
end
end
class C1
def method_missing(method, *args, &block)
C.new.send(method, *args, &block)
end
end
class C2
def method_missing(method, *args, **kwargs, &block)
C.new.send(method, *args, **kwargs, &block)
end
end
C1.new.foo {}
C2.new.foo {}
For example,
expect(array).to be_all { some_block }
is broken. Because it evaluates asarray.all?({})
instead ofarray.all? { some_block }
.I think since https://github.com/trailblazer/rspec-cells/commit/aa3abc935402cef4f990d7ce4f7b00806e3d5d1e.
With ruby <= 2.6:
With ruby >= 2.7: