Skip to content

Commit b092a48

Browse files
herwinweregon
authored andcommitted
Remove some references to/compatibility issues for Ruby 3.2
1 parent 94dbd55 commit b092a48

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

command_line/dash_r_spec.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
out = ruby_exe(fixture(__FILE__, "bad_syntax.rb"), options: "-r #{@test_file}", args: "2>&1", exit_status: 1)
1717
$?.should_not.success?
1818
out.should include("REQUIRED")
19-
20-
# it's tempting not to rely on error message and rely only on exception class name,
21-
# but CRuby before 3.2 doesn't print class name for syntax error
22-
out.should include_any_of("syntax error", "SyntaxError")
19+
out.should include("SyntaxError")
2320
end
2421

2522
it "does not require the file if the main script file does not exist" do

core/unboundmethod/equal_value_spec.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ class << self
110110
c.method(:n).should == Class.instance_method(:new).bind(c)
111111
end
112112

113-
# On CRuby < 3.2, the 2 specs below pass due to method/instance_method skipping zsuper methods.
114-
# We are interested in the general pattern working, i.e. the combination of method/instance_method
115-
# and #== exposes the wanted behavior.
116113
it "considers methods through visibility change equal" do
117114
c = Class.new do
118115
class << self

shared/kernel/at_exit.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@
6060
result = ruby_exe('{', options: "-r#{script}", args: "2>&1", exit_status: 1)
6161
$?.should_not.success?
6262
result.should.include?("handler ran\n")
63-
64-
# it's tempting not to rely on error message and rely only on exception class name,
65-
# but CRuby before 3.2 doesn't print class name for syntax error
66-
result.should include_any_of("syntax error", "SyntaxError")
63+
result.should include("SyntaxError")
6764
end
6865

6966
it "calls the nested handler right after the outer one if a handler is nested into another handler" do

0 commit comments

Comments
 (0)