Skip to content

Instantly share code, notes, and snippets.

@jmettraux
Created July 23, 2008 23:00
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 jmettraux/1932 to your computer and use it in GitHub Desktop.
Save jmettraux/1932 to your computer and use it in GitHub Desktop.
>> def foo (bar)
>> "#{bar} baz"
>> end
=> nil
>> (0..5).collect &method(:foo)
=> ["0 baz", "1 baz", "2 baz", "3 baz", "4 baz", "5 baz"]
>> method(:foo)
=> #<Method: Object#foo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment