# Anonymous class

**URL:** <https://www.ruby-forum.com/t/anonymous-class/188736>\
**Category:** Ruby\
**Created:** [May 17, 2010, 2:59pm UTC](https://www.ruby-forum.com/t/anonymous-class/188736 "2010-05-17T14:59:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wladjmir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/57b2e6/32.png) [@wladjmir](https://www.ruby-forum.com/u/wladjmir)\
**Post date:** [May 17, 2010, 2:59pm UTC](https://www.ruby-forum.com/t/anonymous-class/188736/1 "2010-05-17T14:59:26Z")

</div>

Hi,

in a little macruby-cocoa app when i try to save a simple hash  
(attribute of a model class) inside the fileWrapperOfType method via  
Marshal.load( Marshal.dump(@model.data)) #deep copy , i get an error:

`fileWrapperOfType:error:’: can’t dump anonymous class  
#Class:0x20065e4e0 (TypeError)

i discover that the hash attribute of the class is referenced as  
anonymous class child of an Hash  
this happens with MacRuby 0.6 (also last nightly build), not with 0.5  
Thanks for any help and workaround  
Ciao
