Skip to content

Instantly share code, notes, and snippets.

@domgetter
Created January 10, 2016 16:47
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 domgetter/bcb438d16f0f890dd48e to your computer and use it in GitHub Desktop.
Save domgetter/bcb438d16f0f890dd48e to your computer and use it in GitHub Desktop.
def yields_3
yield 3
end
yields_3 do |n|
puts n
end
# this puts 3 since 3 was yielded and 3 was stored in n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment