codegram/futuroscope — pull request #13 by ggPeti (2014-01-29 17:58:58+00:00)
Title: __setobj__ and marshal_load fix

`__getobj__` was retrieving `:value` from `@resolved_future`, but on the other hand, `__setobj__` was not creating a hash with the given value for the `:value` key. This led to a failure with `dup` because `initialize_dup` in `Delegator` uses these methods to duplicate a delegator.

After a bit of thinking I realized that this was set up intentionally, because `marshal_load` of `Delegator` also uses `__setobj__`, so when we load a dumped object, the correct value from the overridden `marshal_dump` gets written. But this is a conceptual error, because `__getobj__` is supposed to do the opposite of `__setobj__`, as is `marshal_dump` supposed to do the opposite of `marshal_load`. So I overrode the latter, and corrected `__setobj__`.