rubyspec (owner)

Revisions

gist: 17912 Download_button fork
public
Public Clone URL: git://gist.github.com/17912.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
10)
block_stmt_both
 
def f
  a
  begin
    b
  rescue
    c
  end
  d
end
 
expected
  [:defn, :f, [:scope, [:block, [:args], [:vcall, :a], [:rescue, [:vcall, :b], [:resbody, nil, [:vcall, :c]]], [:vcall, :d]]]]
to equal
  [:defn, :f, [:scope, [:block, [:args], [:vcall, :a], [:begin, [:rescue, [:vcall, :b], [:resbody, nil, [:vcall, :c]]]], [:vcall, :d]]]]
 
28)
defn_args_splat
 
def f(*rest)
  # do nothing
end
 
expected
  [:defn, :f, [:scope, [:block, [:args, :*], [:nil]]]]
to equal
  [:defn, :f, [:scope, [:block, [:args, :"*rest"], [:nil]]]]