diff options
author | Benoit Daloze <[email protected]> | 2024-02-05 16:29:57 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2024-02-05 16:29:57 +0100 |
commit | 40642cd3bc581d3bb402ea5e8e61cdfb868b4f68 (patch) | |
tree | 077cc3ac94f880ce3c8c98322331c01cb1cc9cb8 /spec/ruby/shared/kernel | |
parent | abe07d4bf5f2f848b22e511a647a85c878066adb (diff) |
Update to ruby/spec@3fc4444
Diffstat (limited to 'spec/ruby/shared/kernel')
-rw-r--r-- | spec/ruby/shared/kernel/at_exit.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/ruby/shared/kernel/at_exit.rb b/spec/ruby/shared/kernel/at_exit.rb index 26ad361a5b..16d41cb01c 100644 --- a/spec/ruby/shared/kernel/at_exit.rb +++ b/spec/ruby/shared/kernel/at_exit.rb @@ -54,7 +54,10 @@ describe :kernel_at_exit, shared: true do result = ruby_exe('{', options: "-r#{script}", args: "2>&1", exit_status: 1) $?.should_not.success? result.should.include?("handler ran\n") - result.should.include?("syntax error") + + # it's tempting not to rely on error message and rely only on exception class name, + # but CRuby before 3.2 doesn't print class name for syntax error + result.should include_any_of("syntax error", "SyntaxError") end it "calls the nested handler right after the outer one if a handler is nested into another handler" do |