Skip to content

Commit 9e06b76

Browse files
nirvdrumst0012
andcommitted
Update Marshal.dump specs to check error message for anonymous classes and modules.
Co-authored-by: Stan Lo <stan.lo@shopify.com>
1 parent 633ad63 commit 9e06b76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/ruby/core/marshal/dump_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def _dump(level)
222222
end
223223

224224
it "raises TypeError with an anonymous Module" do
225-
-> { Marshal.dump(Module.new) }.should raise_error(TypeError)
225+
-> { Marshal.dump(Module.new) }.should raise_error(TypeError, /can't dump anonymous module/)
226226
end
227227
end
228228

0 commit comments

Comments
 (0)