Feature #4818

Add method marshalable?

Added by Joey Zhou almost 3 years ago. Updated over 1 year ago.

[ruby-core:36707]
Status:Assigned
Priority:Normal
Assignee:Yukihiro Matsumoto
Category:-
Target version:next minor

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

History

#1 Updated by Yui NARUSE almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Yukihiro Matsumoto

#2 Updated by Austin Ziegler almost 3 years ago

On Fri, Jun 3, 2011 at 1:44 PM, Joel VanderWerf
joelvanderwerf@gmail.com wrote:

On 06/02/2011 07:07 PM, Joey Zhou wrote:

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

hash

#3 Updated by Yusuke Endoh over 1 year ago

  • Target version set to next minor

Also available in: Atom PDF