From d311b7d0eb1e973c8d143f03e66ab72588f57a2a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 11 Aug 2015 02:53:31 +0000 Subject: parse.y: optional superclass * parse.y (superclass): make superclass rule optional and allow any contents without a terminator. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rdoc/test_rdoc_markup_to_html.rb | 2 +- test/ruby/test_parse.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/rdoc/test_rdoc_markup_to_html.rb b/test/rdoc/test_rdoc_markup_to_html.rb index 1e4b84fe9e..dbbd287188 100644 --- a/test/rdoc/test_rdoc_markup_to_html.rb +++ b/test/rdoc/test_rdoc_markup_to_html.rb @@ -619,6 +619,7 @@ class TestRDocMarkupToHtml < RDoc::Markup::FormatterTestCase 'def x() end', 'def x; end', 'class C; end', + 'class C end', "module M end", 'a # => blah', 'x { |y| nil }', @@ -629,7 +630,6 @@ class TestRDocMarkupToHtml < RDoc::Markup::FormatterTestCase ] invalid_syntax = [ 'def x end', - 'class C end', 'class C < end', 'module M < C end', 'a=># blah', diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 80d09c1e7b..673b0e7b74 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -206,9 +206,9 @@ class TestParse < Test::Unit::TestCase END end - assert_raise(SyntaxError) do + assert_nothing_raised(SyntaxError) do eval <<-END, nil, __FILE__, __LINE__+1 - class Foo Bar; end + class Foo 1; end END end end -- cgit v1.2.3