This project is read-only.
2

Closed

yield fails in eval'd code

description

%>irb
irb(main):001:0> def f
irb(main):002:1> yield
irb(main):003:1> end
=> nil
irb(main):004:0> f{break}
=> nil
irb(main):005:0> eval 'f{break}'
=> nil
 
%>rbx
def f
... yield
... end
=> nil
f{break}
=> nil
eval 'f{break}'
(eval):1: unexpected break (LocalJumpError)
    from :1:in `f'
    from (eval):0
    from :0:in `eval'
    from :0
Closed Apr 29, 2009 at 11:30 PM by sborde

comments

wrote Apr 29, 2009 at 11:30 PM

Dup of 572

wrote May 20, 2009 at 9:52 PM

wrote Feb 22, 2013 at 12:40 AM

wrote May 16, 2013 at 12:05 PM

wrote Dec 15, 2017 at 10:28 PM