On Thu, Dec 8, 2016 at 11:57 PM, Andy Jones <Andy.Jones / jameshall.co.uk> wrote:
> which is annoying. Can anyone tell me when quirks_mode was introduced?  This is for a Gem, and while it literally has one (1) user -- me -- I like to be comforted by the fantasy that someone else other than me might find it useful one day; for all I know they will demand Ruby 1.9 support...
>

: )
playing devils adv here
fwiw, i am not a big fan of quirks mode

try

JSON.dump

> JSON.dump "foo"
=> "\"foo\""
> JSON.dump "foo".to_json
=> "\"\\\"foo\\\"\""


only the following four methods are good enough for me. but ymmv.
check my crude analogy. like i said, use case  : )

JSON.parse <--> JSON.generate
JSON.dump <--> #to_json

best regards
--botp

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>