Skip to content

Instantly share code, notes, and snippets.

@enebo
Created March 3, 2015 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enebo/41d2a4b2a65f653ad801 to your computer and use it in GitHub Desktop.
Save enebo/41d2a4b2a65f653ad801 to your computer and use it in GitHub Desktop.
def a
yield 3
end
def b
arr = []
x = 1
1.times {
y = 2
arr << x
x = 3
a {
arr << y
y = 4
arr << x
x = 5
}
arr << y
arr << x
x = 6
}
arr << x
p arr
end
100.times { b }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment