Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 1e91bd4

Browse files
committed
Fix spec on ruby head
1 parent acedb0e commit 1e91bd4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

spec/integration/spec_file_load_errors_spec.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,28 @@
147147
run_command "1_spec.rb 2_spec.rb 3_spec.rb"
148148
expect(last_cmd_exit_status).to eq(error_exit_code)
149149
output = normalize_durations(last_cmd_stdout)
150+
151+
object_suffix =
152+
if RUBY_VERSION.to_f > 3.2
153+
""
154+
else
155+
":Object"
156+
end
157+
150158
expect(output).to eq unindent(<<-EOS)
151159
152160
An error occurred while loading ./1_spec.rb.
153161
Failure/Error: boom
154162
155163
NameError:
156-
undefined local variable or method `boom' for main:Object
164+
undefined local variable or method `boom' for main#{object_suffix}
157165
# ./1_spec.rb:1#{spec_line_suffix}
158166
159167
An error occurred while loading ./3_spec.rb.
160168
Failure/Error: boom
161169
162170
NameError:
163-
undefined local variable or method `boom' for main:Object
171+
undefined local variable or method `boom' for main#{object_suffix}
164172
# ./3_spec.rb:1#{spec_line_suffix}
165173
166174

0 commit comments

Comments
 (0)