hsh.to_s â string
hsh.inspect â string
hsh.inspect â string
Instance Public methods
Return the contents of this hash as a string.
h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300 } h.to_s #=> "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
Return the contents of this hash as a string.
h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300 } h.to_s #=> "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
Please login to continue.