Skip to content

Commit 74d3984

Browse files
committed
Support newline in the middle of constant definition
1 parent b7af12d commit 74d3984

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rdoc/parser/ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def get_class_or_module container, ignore_constants = false
378378
record_location container
379379

380380
get_tk
381-
skip_tkspace_without_nl
381+
skip_tkspace
382382
if :on_lparen == peek_tk[:kind] # ProcObjectInConstant::()
383383
parse_method_or_yield_parameters
384384
break

test/rdoc/test_rdoc_parser_ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_get_class_or_module
100100
assert_equal 'E', name_t[:text]
101101
assert_equal 'D::E', given_name
102102

103-
assert_raise RDoc::Error do
103+
assert_nothing_raised do
104104
util_parser("A::\nB").get_class_or_module ctxt
105105
end
106106
end

0 commit comments

Comments
 (0)