Re: Proposing new warning

Walter Lee Davis <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <[email protected]>
I would trigger the warning only after a key miss, so the overhead would only happen in case of a completely missing key. So if you had { foo: 'bar', 'foo' => 'baz', 'boo' => 'blarg' } and you asked for test['foo'] and test[:foo], you would get bar and baz, but if you asked for test[:boo], you would get the warning.

Walter

> On Oct 23, 2018, at 9:18 AM, Greg Navis <[email protected]> wrote:
> 
> Also, existing apps may start generating lots of warnings. What if I store both string and symbols in a hash?
> 
> Best
> Greg
> 
> Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.