Actions
Feature #13045
closedPassing a Hash with String keys as keyword arguments
Feature #13045:
Passing a Hash with String keys as keyword arguments
Status:
Rejected
Assignee:
-
Target version:
-
Description
To the following method
def new request:, response:
end
I'd like to be able to pass both
hash_with_symbol_keys = { request: another_hash, response: another_hash2 }
hash_with_string_keys = { 'request' => another_hash, 'response' => another_hash2 }
I would make a lot cleaner parsing many things returned with string keys(like the output of YAML.load
).
If you don't like the above feature, could you please at least consider adding Hash#symbolize_keys
(like you did with Hash#transform_values
)?
Actions