Skip to content

Instantly share code, notes, and snippets.

@stevencch99
Created May 11, 2019 12:51
Show Gist options
  • Save stevencch99/65ad4283e0a96d14c987aecfe885b2f3 to your computer and use it in GitHub Desktop.
Save stevencch99/65ad4283e0a96d14c987aecfe885b2f3 to your computer and use it in GitHub Desktop.
# Use Proc.new to capture a block passed to a method without an ecplicit block argument
def make_proc
Proc.new
end
double = make_proc { |number| number * 2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment