using puts on a hash in Ruby doesn't result in as nice a display as it does for arrays : Print Hash « Hash « Ruby






using puts on a hash in Ruby doesn't result in as nice a display as it does for arrays


pizza = {"first_topping" => "pepperoni", "second_topping" => "sausage"}
puts pizza

p pizza

 








Related examples in the same category

1.Printing a Hash
2.Print a hash with PP module
3.Print out a nested hash