Skip to content

Commit

Permalink
[GR-19220] Update Marshal.dump specs to check error message for anony…
Browse files Browse the repository at this point in the history
…mous classes and modules (#2897)

PullRequest: truffleruby/3676
  • Loading branch information
eregon committed Mar 3, 2023
2 parents 633ad63 + 9e06b76 commit 49eaf5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/ruby/core/marshal/dump_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _dump(level)
end

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

Expand Down

0 comments on commit 49eaf5b

Please sign in to comment.