Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
judofyr
· 1y ago · 0 comments
Maybe I explained it a bit imprecise. I was trying to explain the following behavior:
def foo p 1 yield p 2 end foo { break }
This only prints "1" because the break stops the execution of the invoked method (foo).
Comments
[–]
Mystery-Machine
1y ago
WAT? I'm a 12+ years Ruby developer and I didn't know this.