I have following code in a test.rb file:
hello = { :credit => "Testing" }
acc = ":credit"
puts hello[a.to_sym]
When I run it as: ruby test.rb, I am supposed to get the value of the Hash element (Testing) but I am getting nothing.
What am I doing wrong? Thanks in advance for the answer.