Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions command_line/dash_r_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
out = ruby_exe(fixture(__FILE__, "bad_syntax.rb"), options: "-r #{@test_file}", args: "2>&1", exit_status: 1)
$?.should_not.success?
out.should include("REQUIRED")

# 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
out.should include_any_of("syntax error", "SyntaxError")
out.should include("SyntaxError")
end

it "does not require the file if the main script file does not exist" do
Expand Down
3 changes: 0 additions & 3 deletions core/unboundmethod/equal_value_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ class << self
c.method(:n).should == Class.instance_method(:new).bind(c)
end

# On CRuby < 3.2, the 2 specs below pass due to method/instance_method skipping zsuper methods.
# We are interested in the general pattern working, i.e. the combination of method/instance_method
# and #== exposes the wanted behavior.
it "considers methods through visibility change equal" do
c = Class.new do
class << self
Expand Down
5 changes: 1 addition & 4 deletions shared/kernel/at_exit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@
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
Expand Down