Created
April 1, 2019 06:28
-
-
Save jenny-codes/2d8c11eff334a9a54c281df277f08d12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
results