-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
``` [1] (main)> [["AA", "a"]].each { |key, value| puts key.to_s } AA => [["AA", "a"]] [2] (main)> [["AA", "a"]].each_key { |key, value| puts key.to_s } NoMethodError: undefined method `each_key' for [["AA", "a"]]:Array from (pry):2:in `__pry__' [3] (main)> [["AA", "a"]].to_h.each_key { |key, value| puts key.to_s } AA => {"AA"=>"a"} ```
- Loading branch information
1 parent
d368faa
commit d237f8f
Showing
3 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters