New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marshal.load raises NameError instead of ArgumentError #791

Closed
tmm1 opened this Issue Mar 25, 2011 · 1 comment

Comments

Projects
None yet
1 participant
@tmm1
Member

tmm1 commented Mar 25, 2011

$ cat test.rb
class Test; end
test = Marshal.dump(Test.new)
Object.send(:remove_const, :Test)
begin
  Marshal.load(test)
rescue => e
  p e
end

$ ruby -v test.rb
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.5.0]
#<ArgumentError: undefined class/module Test>

$ ruby -v test.rb
rubinius 1.2.4dev (1.8.7 6741daea yyyy-mm-dd JI) [x86_64-apple-darwin10.6.0]
#<NameError: Missing or uninitialized constant: Object::Test>
@tmm1

This comment has been minimized.

Show comment
Hide comment
@tmm1

tmm1 Mar 25, 2011

Member

Marshal.load raises ArgumentError on unknown class/modules (closed by b653999)

Member

tmm1 commented Mar 25, 2011

Marshal.load raises ArgumentError on unknown class/modules (closed by b653999)

@tmm1 tmm1 closed this Mar 25, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment