Skip to content

Instantly share code, notes, and snippets.

@nkpart
Created December 11, 2008 06:23
Show Gist options
  • Save nkpart/34620 to your computer and use it in GitHub Desktop.
Save nkpart/34620 to your computer and use it in GitHub Desktop.
class Array
def to_proc
x = self.dup
proc { |y| x[0].send(x[1], y) }
end
end
[".", "what"].select(&[File, :exists?]) # <= [","]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment