Export to GitHub

ruby-security - issue #1

return cannot be called within a Proc


Posted on Sep 20, 2012 by Happy Cat

The document says in "Blocks and Procs" section:

"3. Calling return within Proc will result in method calling it returning"

This is wrong. Calling return within a proc raises an error:

"unexpected return"

Comment #1

Posted on Sep 21, 2012 by Happy Bird

you are right. I've originally tested this on JRuby which worked, MRI returns the above error. Removed that bullet point.

Status: Fixed

Labels:
Type-Defect Priority-Medium