rspec/rspec-mocks — pull request #820 by yujinakayama (2014-11-18 13:12:45+00:00)
Title: Fix an error when a test double was deserialized from YAML

This fixes #777.

The ivar `@__unfrozen_attributes` was properly serialized with YAML.

```ruby
"--- !ruby/object:RSpec::Mocks::Double\n__null_object: false\n__unfrozen_attributes: {}\nname: something\noptions:\n :__declared_as: Double\n"
```

However the error was caused [the invocation of `#respond_to?`](https://github.com/ruby/ruby/blob/v2_1_5/ext/psych/lib/psych/visitors/to_ruby.rb#L345) in the middle of the deserialization (i.e. before the ivar is restored).