Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
Created January 30, 2013 02:58
Embed
What would you like to do?
irb(main):008:0> p = :nil?.to_proc
=> #<Proc:0x007ff4a5078158>
irb(main):009:0> [1,nil].reject(p)
ArgumentError: wrong number of arguments(1 for 0)
from (irb):9:in `reject'
from (irb):9
from /usr/local/ruby-1.9.3-p327/bin/irb:12:in `<main>'
irb(main):010:0> [1,nil].reject(&p)
=> [1]
@zspencer
Copy link

SO MUCH SCIENCE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment