From: merch-redmine@... Date: 2020-11-19T23:59:57+00:00 Subject: [ruby-core:100951] [Ruby master Bug#17334] Marshal cannot dump instance of Monitor Issue #17334 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Rejected This is expected and not a bug, as you can't dump the state of the Monitor. Instances of many core classes, such as Proc, Mutex, Thread, and Queue are likewise not dumpable. ---------------------------------------- Bug #17334: Marshal cannot dump instance of Monitor https://bugs.ruby-lang.org/issues/17334#change-88605 * Author: Littlejd1997 (Jon David Schober) * Status: Rejected * Priority: Normal * ruby -v: 2.7.2 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- I'm not really sure why, but I hope someone else know whats going on. I was digging into an error I had with Rails caching. Long story short, I was caching a HTTP::CookieJar object which has an instance variable of type Monitor. The rails cache uses Marshaling, which fails on Monitor instances ``` ruby 2.7.2 :005 > Marshal.dump(Monitor.new) Traceback (most recent call last): 6: from /Users/jondavid.schober/.rvm/rubies/ruby-2.7.2/bin/irb:23:in `<main>' 5: from /Users/jondavid.schober/.rvm/rubies/ruby-2.7.2/bin/irb:23:in `load' 4: from /Users/jondavid.schober/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/irb-1.2.6/exe/irb:11:in `<top (required)>' 3: from (irb):4 2: from (irb):5:in `rescue in irb_binding' 1: from (irb):5:in `dump' TypeError (no _dump_data is defined for class Monitor) 2.7.2 :006 > ``` -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>