Last active
February 23, 2019 00:58
-
-
Save sarogers/9afd1c1fc8aac574e6a248df60e946ac 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 foo | |
x = 42 | |
y = 1337 | |
p = Proc.new do | |
return x | |
end | |
p.call | |
y | |
end | |
foo # => 42 | |
def bar | |
x = 42 | |
y = 1337 | |
l = lambda do | |
return x | |
end | |
l.call | |
y | |
end | |
bar # => 1337 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment