Skip to content

Instantly share code, notes, and snippets.

@alindeman
Created December 22, 2010 16:28
Show Gist options
  • Save alindeman/751719 to your computer and use it in GitHub Desktop.
Save alindeman/751719 to your computer and use it in GitHub Desktop.
actions = []
for i in [1, 2, 3, 4, 5]
actions.push lambda { puts i }
end
actions.each(&:call)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment