You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current attr_accessor_with_default implementation of writer method changes object's singleton class. That does not work well with marshaling, and such objects can't be easily put in memcache:
cache=MemCache.new('localhost:11211')classCattr_accessor_with_default:foo,'bar'endc=C.newcache.set('c',c)# okc.foo='hello'cache.set('c',c)# /usr/lib/ruby/1.8/memcache.rb:300:in `dump': singleton can't be dumped (TypeError)
Please find proposed patch that changes attr_accessor_with_default implementation so that it doesn't produce surprising changes in object singleton class.
The text was updated successfully, but these errors were encountered:
Imported from Lighthouse.
Comment by Santiago Pastorino - 2011-02-02 16:37:59 UTC
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/4776
Created by Serge Balyuk - 2011-04-09 22:41:51 UTC
The current
attr_accessor_with_default
implementation of writer method changes object's singleton class. That does not work well with marshaling, and such objects can't be easily put in memcache:Please find proposed patch that changes
attr_accessor_with_default
implementation so that it doesn't produce surprising changes in object singleton class.The text was updated successfully, but these errors were encountered: