Created
July 25, 2009 05:05
-
-
Save capotej/154704 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
capotej@P1:~ ➔ irb | |
irb(main):001:0> 1,3 | |
SyntaxError: compile error | |
(irb):1: syntax error, unexpected ',', expecting $end | |
from (irb):1 | |
irb(main):002:0> lamda do | |
irb(main):003:1* 1,3 | |
irb(main):004:1> end | |
SyntaxError: compile error | |
(irb):3: syntax error, unexpected ',', expecting kEND | |
from (irb):4 | |
from :0 | |
irb(main):005:0> return 1,3 | |
LocalJumpError: unexpected return | |
from (irb):5 | |
from :0 | |
irb(main):009:0> lambda do | |
irb(main):010:1* return 1,3 | |
irb(main):011:1> end | |
=> #<Proc:0xb7dce0bc@(irb):9> | |
irb(main):013:0> lambda { return 1,3 }.call | |
=> [1, 3] | |
irb(main):016:0> def test_func | |
irb(main):017:1> return 1,3 | |
irb(main):018:1> end | |
=> nil | |
irb(main):019:0> test_func | |
=> [1, 3] | |
irb(main):020:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment