Closed
Description
I stumbled across this not working on JRuby directly (I usually never hit real bugs in JRuby unless I am working on what someone else reports EXCITING!)...for the humanity...We should not be printing out OH UH. The return is a lexical return and should return from foo:
e = Enumerator.new do |yielder|
[1,2,3].each { |i| yielder << i }
end
def foo(e)
e.each do |i|
p i
return if i == 2
p i
end
p "OH UH"
end
foo e