diff options
-rw-r--r-- | lib/rdoc/parser/c.rb | 3 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_parser_ruby.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb index df86d7f452..075f4a072b 100644 --- a/lib/rdoc/parser/c.rb +++ b/lib/rdoc/parser/c.rb @@ -1015,7 +1015,8 @@ class RDoc::Parser::C < RDoc::Parser elsif p_count == -1 then # argc, argv rb_scan_args body else - "(#{(1..p_count).map { |i| "p#{i}" }.join ', '})" + args = (1..p_count).map { |i| "p#{i}" } + "(#{args.join ', '})" end diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb index b3026b14ca..ef8ad91668 100644 --- a/test/rdoc/test_rdoc_parser_ruby.rb +++ b/test/rdoc/test_rdoc_parser_ruby.rb @@ -921,7 +921,7 @@ end @parser.parse_class @top_level, RDoc::Parser::Ruby::NORMAL, tk, @comment end err = stds[1] - assert_match(/Expected class name or '<<'\. Got/, err) + assert_match(/Expected class name or '<<\'\. Got/, err) end def test_parse_syntax_error_code |