summaryrefslogtreecommitdiff
path: root/test/prism/fixtures/rescue.txt
blob: 99170fbe0ff311beb0d34c2d77ecb13fe93725bb (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
foo rescue nil

foo rescue
nil

tap { break rescue nil }

tap { next rescue nil }

return rescue nil

foo rescue nil || 1

foo rescue nil ? 1 : 2

begin; a; rescue *b; end

foo do |x|
  bar(y) rescue ArgumentError fail "baz"
end

if a = foo rescue nil
  bar
end

def some_method = other_method 42 rescue nil

def a
  a b:
rescue
end

foo if bar rescue baz

z = x y rescue c d