[#79440] [Ruby trunk Bug#13188] Reinitialize Ruby VM. — shyouhei@...
Issue #13188 has been updated by Shyouhei Urabe.
6 messages
2017/02/06
[#79441] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.
— SASADA Koichi <ko1@...>
2017/02/06
On 2017/02/06 10:10, shyouhei@ruby-lang.org wrote:
[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>
Hi,
15 messages
2017/02/15
[#79541] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/15
Em 15-02-2017 05:05, Daniel Ferreira escreveu:
[#79543] Re: Immutable Strings vs Symbols
— Daniel Ferreira <subtileos@...>
2017/02/16
Hi Rodrigo,
[#79560] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/16
Em 15-02-2017 22:39, Daniel Ferreira escreveu:
[ruby-core:79400] [Ruby trunk Feature#13045] Passing a Hash with String keys as keyword arguments
From:
nobu@...
Date:
2017-02-03 03:11:53 UTC
List:
ruby-core #79400
Issue #13045 has been updated by Nobuyoshi Nakada.
Robert A. Heiler wrote:
> Perhaps this would also reduce the need for strange things such as
> HashWithIndifferentAccess. Newcomers will always wonder whether they should
> use strings or symbols (or even worse, both at the same time in the same
> hash).
First of all, why do you want to access them indifferently?
It just sounds a diabolical habit, to me.
----------------------------------------
Feature #13045: Passing a Hash with String keys as keyword arguments
https://bugs.ruby-lang.org/issues/13045#change-62832
* Author: Anatoly Chernow
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
To the following method
~~~ ruby
def new request:, response:
end
~~~
I'd like to be able to pass both
~~~ ruby
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`)?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>