Created
February 17, 2012 01:53
-
-
Save practicingruby/1849750 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >> def foo | |
| >> yield(1) | |
| >> end | |
| => nil | |
| >> foo { } | |
| => nil | |
| >> bar = ->() { } | |
| => #<Proc:0x00000100a70f98@(irb):5 (lambda)> | |
| >> foo(&bar) | |
| ArgumentError: wrong number of arguments (1 for 0) | |
| from (irb):5:in `block in irb_binding' | |
| from (irb):2:in `foo' | |
| from (irb):6 | |
| from /Users/seacreature/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment