Skip to content

Instantly share code, notes, and snippets.

@jaredatron
Forked from anonymous/gist:107171
Created May 5, 2009 20:14
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 jaredatron/107173 to your computer and use it in GitHub Desktop.
Save jaredatron/107173 to your computer and use it in GitHub Desktop.
class Regexp
def to_proc
lambda {|arg| match(arg)}
endhttp://gist.github.com/images/modules/gist/save_button.png
end
puts /whatever/.to_proc.call(5,6)
# => untitled:3: warning: multiple values for a block parameter (2 for 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment