Skip to content

Instantly share code, notes, and snippets.

@napramirez
Created April 10, 2015 02:13
Show Gist options
  • Save napramirez/35ca741051374a1285d0 to your computer and use it in GitHub Desktop.
Save napramirez/35ca741051374a1285d0 to your computer and use it in GitHub Desktop.
def add_x_y(x, y)
z = x + y
yield z
return z
end
add_x_y(2,3) do |z| puts z end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment