Skip to content

Instantly share code, notes, and snippets.

Created May 5, 2009 20:04
Show Gist options
  • Save anonymous/107171 to your computer and use it in GitHub Desktop.
Save anonymous/107171 to your computer and use it in GitHub Desktop.
class Regexp
def to_proc
lambda {|arg| match(arg)}
end
end
ex = %w(love me inside your face)
puts ex.find_all(&/^l|y|f/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment