Closed p-lambert closed 9 years ago
Any thoughts on this?
Sorry I can't accept this. Other ruby objects don't have this kind of a coercion and I don't think it's a good idea to introduce this in coercible. A string can be easily symbolized but anything else is not, assuming that you want name of an object's class as a symbol would be very library-specific.
I have just came across a problem in which I need to coerce an
Object
subclass into aSymbol
. Is there any reason for not having a#to_symbol
coerce method?Thank you!