We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75082bb commit a3ffcd4Copy full SHA for a3ffcd4
scenario/control/rescue-assign.rb
@@ -6,11 +6,20 @@ def foo(n)
6
e.message
7
end
8
9
+def bar(n)
10
+ raise if n != 0
11
+ n.to_s
12
+rescue *[StandardError] => e
13
+ e.message
14
+end
15
+
16
foo(1)
17
+bar(1)
18
19
## diagnostics
20
21
## assert
22
class Object
23
def foo: (Integer) -> String
24
+ def bar: (Integer) -> String
25
scenario/control/rescue-splat.rb
@@ -0,0 +1,15 @@
1
+## update
2
+def foo
3
+ begin
4
+ :a
5
+ rescue *[StandardError]
+ :b
+ end
+foo
+## assert
+class Object
+ def foo: -> (:a | :b)
0 commit comments