Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def proc_return
Proc.new { return 'return from inside Proc' }.call
return 'return from proc function'
end
def lambda_return
lambda { return 'return from inside lambda' }.call
return 'return from lambda function'
end
puts proc_return
puts lambda_return
@jenny-codes
Copy link
Author

jenny-codes commented Apr 1, 2019

results

return from inside Proc
return from lambda function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment