This project is archived and is in readonly mode.
Stack error with Hash.to_json for nested number values
-
Dan Barry
- Tag changed from 2.1, activesupport, bug to 2.1, activesupport, bug
I wrote a unit test for this that passed on edge rails, so it looks like this has been fixed already.
-
Repository
- State changed from new to committed
(from [0d4dbb3dfaec8355e072d8f758de40a277f2f009]) test nested hash with float
[#652 Stack error with Hash.to_json for nested number values state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
-
Noel Rappin
- Tag changed from 2.1, activesupport, bug to 2.1, activesupport, json
Oddly, I'm still having the problem, with Rails 2.2. Just saw it when trying to run the open flash chart example,
http://pullmonkey.com/projects/o...
The resulting JSON should look like this
{"title": "Tasker", "elements": [{"type": "bar_glass", "values": [1, 2]}]}
But I'm getting the same stack overflow error. The original example doesn't work for me either.
noel$ script/console Loading development environment (Rails 2.2.2)
hash = { ?> "CHI" => { ?> :dislay_name => "chicago", ?> :latitude => 123.234
} }=> {"CHI"=>{:dislay_name=>"chicago", :latitude=>123.234}}
result = hash.to_json -
Noel Rappin
Asking around my group, the original example works for some of us, but not for others in a script/console session.
