Skip to content

Instantly share code, notes, and snippets.

@capotej
Created July 25, 2009 05:05
Show Gist options
  • Save capotej/154704 to your computer and use it in GitHub Desktop.
Save capotej/154704 to your computer and use it in GitHub Desktop.
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