Bug #15105 ยป 0001-add-a-failing-test-for-lazy-block.patch
| test/-ext-/debug/test_debug.rb | ||
|---|---|---|
|
binds = inspector_in_eval
|
||
|
binds_check binds, bug7635
|
||
|
end
|
||
|
class MyRelation
|
||
|
include Enumerable
|
||
|
def each(&block)
|
||
|
records.each(&block)
|
||
|
end
|
||
|
def records
|
||
|
[1]
|
||
|
end
|
||
|
end
|
||
|
def test_lazy_block
|
||
|
x = MyRelation.new.any? do
|
||
|
Bug::Debug.inspector
|
||
|
true
|
||
|
end
|
||
|
assert x, "any should have returned true"
|
||
|
end
|
||
|
end
|
||