Issue #2160 has been updated by Tim Bray.


Per RFC4267, http://www.ietf.org/rfc/rfc4627.txt, "foo" isn't legal JSON.  Top level has to be an object {} or array [].  So unparse should refuse to process "foo".  This isn't just a theoretical standards-wonk problem, I got bitten trying to interop with Java JSON libraries on this one.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2160

----------------------------------------
http://redmine.ruby-lang.org