Project

General

Profile

Actions

Bug #17334

closed

Marshal cannot dump instance of Monitor

Added by Littlejd1997 (Jon David Schober) over 3 years ago. Updated over 3 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:100950]

Description

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

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 > 
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0