Let's try this again...#149
Conversation
Use `Object#respond_to?` to determine which MultiJson API to use.
|
I'd much rather see us use a method like |
|
I'm supposed to add this ugly hack because you don't want to alias dump to encode? |
|
@mperham Encode is aliased to dump, it just throws warnings. If you don't want warnings, you need to feature-detect. |
|
Yeah, I'm saying there's no reason for the warnings. Just support both pairs. dump/load and encode/decode are both perfectly reasonable names. |
These methods perform MultiJson feature detection and can be removed after this library's MultiJson dependency is upgraded to ~> 2.0.
|
I've cleaned up the patch, per @jc00ke's suggestion. |
|
Much better, thanks. |
|
Yes, much better. Thanks @sferik! |
|
My pleasure. When MultiJson 2.0 is released and you're ready to upgrade, you should be able to safely remove |
|
I would actually prefer to leave as is and only change what's inside |
Use
Object#respond_to?to determine which MultiJson API to use.