Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
test.rb ファイルに次のコードがあります。
hello = { :credit => "Testing" } acc = ":credit" puts hello[a.to_sym]
次のように実行するとruby test.rb、 Hash 要素 (テスト) の値を取得することになっていますが、何も取得していません。
ruby test.rb
私は何を間違っていますか?答えてくれてありがとう。