mperham/dalli — pull request #452 by alexsergeyev (2014-05-07 13:07:02+00:00)
Title: Reading data by #fetch method with block returns different object fix #451

```ruby
irb(main):095:0> Marshal.dump Rails.cache.fetch('test2'){a = Sunspot::Search::PaginatedCollection.new([1,2,3],1,1,1); a}
=> "\x04\bo:)Sunspot::Search::PaginatedCollection\t:\x10@collection[\bi\x06i\ai\b:\x12@current_pagei\x06:\x0E@per_pagei\x06:\x11@total_counti\x06"
irb(main):096:0> Marshal.dump Rails.cache.fetch('test2'){a = Sunspot::Search::PaginatedCollection.new([1,2,3],1,1,1); a}
=> "\x04\b[\bi\x06i\ai\b"
irb(main):097:0> Marshal.dump Rails.cache.fetch('test2')
=> "\x04\bo:)Sunspot::Search::PaginatedCollection\t:\x10@collection[\bi\x06i\ai\b:\x12@current_pagei\x06:\x0E@per_pagei\x06:\x11@total_counti\x06"
irb(main):098:0> Marshal.dump Rails.cache.read('test2')
=> "\x04\bo:)Sunspot::Search::PaginatedCollection\t:\x10@collection[\bi\x06i\ai\b:\x12@current_pagei\x06:\x0E@per_pagei\x06:\x11@total_counti\x06"
```