summaryrefslogtreecommitdiff
path: root/test/prism/fixtures/if.txt
blob: 4139bae5edbbd2e6b2c81039c6391f8d23235804 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
if true; 1; end

if true
1 else 2 end

if true then true elsif false then false elsif nil then nil else self end

1 if true

tap { break if true }

tap { next if true }

return if true

tap { if exit_loop then break 42 end }

if foo
then bar
end

a if b if c

if true
  a b:
else
end

if type in 1
elsif type in B
end

if f1
  lambda do |_|
  end
elsif f2
  lambda do |_|
  end
else
  lambda do |_|
  end
end