Please sign in to comment.
Adding methods with a generic name to a core Ruby class (and therefor…
…e all instances of that class) is not a good idea. Crack was defining  `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 . This commit changes Crack so it just defines the `attributes` accessor methods on the relevant instances of `String`.  https://github.com/jnunemaker/crack/blob/master/lib/crack/xml.rb#L85  https://github.com/mongoid/mongoid/blob/master/lib/mongoid/relations/builder.rb#L38
- Loading branch information...
Showing with 16 additions and 2 deletions.