drapergem/draper — pull request #406 by haines (2012-12-29 13:08:13+00:00)
Title: Unfreeze collection decorator

As discussed on #387.

Unfreezes the source and decorated collections, and prevents modification of the source by protecting the `attr_reader`.

This then allows modification of the decorated collection independently of the source.

This change would cause unexpected behaviour with the previous implementation of `==`, which compared `source == other`:

```ruby
decorated_collection = Draper::CollectionDecorator.new(collection)
decorated_collection << another_item

decorated_collection == collection
# => true
```

To fix this, `==` is now delegated to the decorated collection directly.