Project

General

Profile

Actions

Feature #4818

open

Add method marshalable?

Added by yimutang (Joey Zhou) over 13 years ago. Updated almost 7 years ago.

Status:
Assigned
Target version:
-
[ruby-core:36707]

Description

Some objects can not be marshaled. Maybe there should be a method to tell it.

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?"


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Feature #16240: Are all objects and methods marshalableRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0