Can somebody please explain the following:

h = Hash.new("Go Fish")
h[:a] = 100

puts h[:a]           #=> 100
puts h[:c]           #=> "Go Fish"

is the default string "Go Fish" a key to h or a value?

Thank you.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to