diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2026-01-28 22:30:21 +0100 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2026-01-28 23:01:22 +0100 |
| commit | dbd2ff7adca9b49e4bfa7bc3ec8b83bd437f8cb7 (patch) | |
| tree | 5f4f1609d2015fde92c25b175b84078dfcf1c92f /spec/ruby/shared | |
| parent | a8b877a843643fbdccd1a42efaf94ad27705dd55 (diff) | |
Update to ruby/spec@83e26c9
Diffstat (limited to 'spec/ruby/shared')
| -rw-r--r-- | spec/ruby/shared/kernel/at_exit.rb | 5 | ||||
| -rw-r--r-- | spec/ruby/shared/queue/freeze.rb | 18 | ||||
| -rw-r--r-- | spec/ruby/shared/string/start_with.rb | 12 |
3 files changed, 7 insertions, 28 deletions
diff --git a/spec/ruby/shared/kernel/at_exit.rb b/spec/ruby/shared/kernel/at_exit.rb index 29db79bb39..d57ab73920 100644 --- a/spec/ruby/shared/kernel/at_exit.rb +++ b/spec/ruby/shared/kernel/at_exit.rb @@ -60,10 +60,7 @@ 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") - - # 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") + result.should include("SyntaxError") end it "calls the nested handler right after the outer one if a handler is nested into another handler" do diff --git a/spec/ruby/shared/queue/freeze.rb b/spec/ruby/shared/queue/freeze.rb index 4c506a4235..5dedd005df 100644 --- a/spec/ruby/shared/queue/freeze.rb +++ b/spec/ruby/shared/queue/freeze.rb @@ -1,18 +1,8 @@ describe :queue_freeze, shared: true do - ruby_version_is ""..."3.3" do - it "can be frozen" do - queue = @object.call + it "raises an exception when freezing" do + queue = @object.call + -> { queue.freeze - queue.should.frozen? - end - end - - ruby_version_is "3.3" do - it "raises an exception when freezing" do - queue = @object.call - -> { - queue.freeze - }.should raise_error(TypeError, "cannot freeze #{queue}") - end + }.should raise_error(TypeError, "cannot freeze #{queue}") end end diff --git a/spec/ruby/shared/string/start_with.rb b/spec/ruby/shared/string/start_with.rb index 4b947a3bbf..9592eda4d4 100644 --- a/spec/ruby/shared/string/start_with.rb +++ b/spec/ruby/shared/string/start_with.rb @@ -70,15 +70,7 @@ describe :start_with, shared: true do $1.should be_nil end - ruby_version_is ""..."3.3" do - it "does not check that we are not matching part of a character" do - "\xC3\xA9".send(@method).should.start_with?("\xC3") - end - end - - ruby_version_is "3.3" do # #19784 - it "checks that we are not matching part of a character" do - "\xC3\xA9".send(@method).should_not.start_with?("\xC3") - end + it "checks that we are not matching part of a character" do + "\xC3\xA9".send(@method).should_not.start_with?("\xC3") end end |
