irb(main):001:0> Marshal.dump(Twitter::NullObject.new)
RuntimeError: Twitter::NullObject#marshal_dump returned same class instance
from (irb):1:in `dump'
from (irb):1
Causes this to fail (replace keys accordingly)
require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = "CONSUMER_KEY"
config.consumer_secret = "CONSUMER_SECRET"
end
timeline = client.user_timeline('edogawa_test').select do |tweet|
tweet.retweeted_status.nil? || tweet.user.id != tweet.retweeted_status.user.id
end
Marshal.dump(timeline)
Am I doing something wrong here or there is a bug somewhere? NullObject missing #marshal_dump, perhaps?
Looks like enabling black_hole causes #marshal_dump to return itself (and thus failing dump).
IIUC, this error:
Causes this to fail (replace keys accordingly)
Am I doing something wrong here or there is a bug somewhere?
NullObject
missing#marshal_dump
, perhaps?Looks like enabling
black_hole
causes#marshal_dump
to return itself (and thus failing dump).