[ruby-core:125609] [Ruby Bug#22090] Enabling Ruby::Box breaks Marshal.load.
Issue #22090 has been reported by joker1007 (Tomohiro Hashidate). ---------------------------------------- Bug #22090: Enabling Ruby::Box breaks Marshal.load. https://bugs.ruby-lang.org/issues/22090 * Author: joker1007 (Tomohiro Hashidate) * Status: Open * ruby -v: ruby 4.1.0dev (2026-05-31T10:35:05Z master 12c8599ffa) +PRISM [x86_64-linux] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- This is very simple. ``` ruby class Foo end f = Marshal.dump(Foo.new) Marshal.load(f) ``` # No Ruby::Box This code returns `#<Foo:0x00007fdb9c744da0>`. --- # Ruby::Box enabled This code returns "undefined class/module Foo". ``` marshal_main.rb:5:in 'Marshal.load': undefined class/module Foo (ArgumentError) p Marshal.load(f) ^ from marshal_main.rb:5:in '<main>' ``` -- https://bugs.ruby-lang.org/
participants (1)
-
joker1007 (Tomohiro Hashidate)