JSON#generate documentation wrong/misleading
JSON.generate only allows "objects or arrays", that
to_json allows more, and uses
1.to_json as an example for that. But I just tried
JSON.generate(1) and it works as well. What's up with that?
That talks about
state a lot. I think it should say
opts, as that is the argument name, no? Also, it says "state is * a JSON::State object". Note the "*". I think this should be a bullet point, i.e., "a JSON::State object" should be an item in the list following it.