Project

General

Profile

Actions

Feature #16240

closed

Are all objects and methods marshalable

Added by mattumd (Matt Zand) about 5 years ago. Updated about 5 years ago.

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

Description

As I work with objects, some of them are not marshaled. Maybe there should be a method to tell whether an object is marshalable or not.

See below example:

hash = Hash.new {|h,k| k * 2}

this hash can't be marshaled because it has a default proc. If existing such method:

Marshal.marshalable?(hash) #=> method "Marshal.marshalable?"
hash.marshalable? #=> method "Kernel#marshalable?"

If you think the method name hard to spell, maybe get a synonym "dumpable?"

Thanks,

Matt
https://coding-bootcamps.com/
https://myhsts.org/
https://dcwebmakers.com/


Related issues 1 (1 open0 closed)

Is duplicate of Ruby master - Feature #4818: Add method marshalable?Assignedmatz (Yukihiro Matsumoto)Actions
Actions #1

Updated by mame (Yusuke Endoh) about 5 years ago

Updated by hsbt (Hiroshi SHIBATA) about 5 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0