Answers for "ruby are spaces in keys of hashes allowed"

1

ruby are spaces in keys of hashes allowed

# Any Object can be used as a key
# so this is allowed:
hash = {
	"k e y   w i t h  S P A C E S" => "is valid"
}
puts hash.inspect
#> {"k e y   w i t h  S P A C E S"=>"is valid"}
Posted by: Guest on June-18-2020

Browse Popular Code Answers by Language