Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structs should be serializable #13

Open
gusevfe opened this issue Feb 16, 2014 · 0 comments
Open

Structs should be serializable #13

gusevfe opened this issue Feb 16, 2014 · 0 comments

Comments

@gusevfe
Copy link

gusevfe commented Feb 16, 2014

It would be very useful to be able to serialize fast open structs, since usual open structs allow this. For example, Marshal can be used with regular structs, but not with open ones.

$ irb
irb(main):001:0> require 'ostruct'
=> true
irb(main):002:0> Marshal.dump(OpenStruct.new)
=> "\x04\bU:\x0FOpenStruct{\x00"
irb(main):003:0> require 'fast_open_struct'
=> true
irb(main):004:0> Marshal.dump(FastOpenStruct.new)
TypeError: can't dump anonymous class #<Class:0x20055030>
        from (irb):4:in `dump'
        from (irb):4
        from /usr/bin/irb:12:in `<main>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant