diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_ast.rb | 4 | ||||
| -rw-r--r-- | test/ruby/test_iseq.rb | 2 | ||||
| -rw-r--r-- | test/ruby/test_syntax.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index 05f4211cba..31744e9215 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -155,7 +155,7 @@ class TestAst < Test::Unit::TestCase end def test_parse_raises_syntax_error - assert_raise_with_message(SyntaxError, /keyword_end/) do + assert_raise_with_message(SyntaxError, /\bend\b/) do RubyVM::AbstractSyntaxTree.parse("end") end end @@ -164,7 +164,7 @@ class TestAst < Test::Unit::TestCase Tempfile.create(%w"test_ast .rb") do |f| f.puts "end" f.close - assert_raise_with_message(SyntaxError, /keyword_end/) do + assert_raise_with_message(SyntaxError, /\bend\b/) do RubyVM::AbstractSyntaxTree.parse_file(f.path) end end diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 078c11472d..ccff553e6f 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -256,7 +256,7 @@ class TestISeq < Test::Unit::TestCase f.puts "end" f.close path = f.path - assert_in_out_err(%W[- #{path}], "#{<<-"begin;"}\n#{<<-"end;"}", /keyword_end/, [], success: true) + assert_in_out_err(%W[- #{path}], "#{<<-"begin;"}\n#{<<-"end;"}", /unexpected end/, [], success: true) begin; path = ARGV[0] begin diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index bd9c996138..dee9187a9c 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -989,7 +989,7 @@ eom end def test_parenthesised_statement_argument - assert_syntax_error("foo(bar rescue nil)", /unexpected modifier_rescue/) + assert_syntax_error("foo(bar rescue nil)", /unexpected rescue \(modifier\)/) assert_valid_syntax("foo (bar rescue nil)") end |
