Skip to content

Commit

Permalink
Merge pull request #2240 from herwinw/marshal_dump_class_name
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m authored Sep 29, 2024
2 parents cbaba03 + 71c8361 commit 6bc2160
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions spec/core/marshal/dump_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@
end

it "does not use Class#name" do
NATFIXME 'does not use Class#name', exception: SpecFailedException do
UserMarshal.should_not_receive(:name)
Marshal.dump(UserMarshal.new)
end
UserMarshal.should_not_receive(:name)
Marshal.dump(UserMarshal.new)
end

it "raises TypeError if an Object is an instance of an anonymous class" do
Expand Down
2 changes: 1 addition & 1 deletion src/marshal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def write_regexp(value)

def write_user_marshaled_object(value)
write_char('U')
write(value.class.name.to_sym)
write(value.class.to_s.to_sym)
write(value.send(:marshal_dump))
end

Expand Down

0 comments on commit 6bc2160

Please sign in to comment.