t6d / smart_properties

Ruby accessors on steroids
MIT License
177 stars 20 forks source link

Revert "Forwarding of unprocessed options" #27

Closed t6d closed 9 years ago

t6d commented 9 years ago

Reverts t6d/smart_properties#26 due to unforeseen issues with HashWithIndifferentAccess instances. These hashes return the keys as they were originally inserted and potentially break the properties.key? check in the initializer.

The better solution would be to use the property collection instead of a to_hash version of this collection. To make this work, the property collection needs to implement caching for performance reasons.

A simple solution would have been to do key.to_sym, but since symbols are not GCed before 2.2, this might cause harm when mapping API input directly to SmartProperties enabled classes.