Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding methods with a generic name to a core Ruby class (and therefore
all instances of that class) is not a good idea. Crack was defining [1] `attributes` accessor methods on the core Ruby `String` class which in turn caused a very difficult to track down bug when using Mongoid, because of this [2]. This commit changes Crack so it just defines the `attributes` accessor methods on the relevant instances of `String`. [1] https://github.com/jnunemaker/crack/blob/master/lib/crack/xml.rb#L85 [2] https://github.com/mongoid/mongoid/blob/master/lib/mongoid/relations/builder.rb#L38 Created by floehopper
- Loading branch information