Re: #to_json incompatibilities between ActiveSupport & JSON gems

Michael Koziarski
2008-11-29T12:30:05Z

> Any thoughts on this? I added a simple fix to ruote
> (http://tinyurl.com/6boobf) for Time#to_json and it works perfectly. I just
> can''t help but think more and more people would use ActiveSupport
outside of
> Rails, and especially in an environment where the JSON gem is present...

I''m a little hesitant because those arguments to to_json are just
ignored.  So you get ''compatibility'' in the sense that you
don''t get
an ArgumentError, but it won''t do what you think it will.

Silent misbehaviour here seems *worse* than failing fast?

--
Cheers

Koz