We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3ecc988 + d1ff2cf commit f665731Copy full SHA for f665731
lib/syntax_tree/parser.rb
@@ -717,8 +717,7 @@ def on_begin(bodystmt)
717
else
718
keyword = find_token(Kw, "begin")
719
end_location =
720
- if bodystmt.rescue_clause || bodystmt.ensure_clause ||
721
- bodystmt.else_clause
+ if bodystmt.else_clause
722
bodystmt.location
723
724
find_token(Kw, "end").location
test/fixtures/def_endless.rb
@@ -18,3 +18,11 @@ def self.foo() = bar
18
def self.foo = bar
19
% # >= 3.1.0
20
def self.foo = bar baz
21
+%
22
+begin
23
+ true
24
+rescue StandardError
25
+ false
26
+end
27
+
28
+def foo? = true
0 commit comments