We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b612856 commit 6bd9fa6Copy full SHA for 6bd9fa6
test/test_rdoc_parser_ruby.rb
@@ -3573,6 +3573,25 @@ class C
3573
assert_equal :public, const_c.visibility
3574
end
3575
3576
+ def test_document_after_rescue_inside_paren
3577
+ util_parser <<-RUBY
3578
+class C
3579
+ attr_accessor :sample if (1.inexistent_method rescue false)
3580
+ # first
3581
+ # second
3582
+ def a
3583
+ end
3584
+end
3585
+ RUBY
3586
+
3587
+ @parser.scan
3588
3589
+ c = @store.find_class_named 'C'
3590
3591
+ c_a = c.find_method_named 'a'
3592
+ assert_equal "first\nsecond", c_a.comment.text
3593
3594
3595
def test_singleton_method_via_eigenclass
3596
util_parser <<-RUBY
3597
class C
0 commit comments