General

Profile

Soilent (Konstantin x)

  • Registered on: 11/22/2013
  • Last connection: 06/16/2018

Issues

Activity

03/08/2018

11:59 AM Ruby trunk Feature #14580: Hash#store accepts a block
Eregon (Benoit Daloze) wrote:
> Soilent (Konstantin x) wrote:
> > Consider another example `hash.store(:time) { |ts...
11:05 AM Ruby trunk Feature #14580: Hash#store accepts a block
mame (Yusuke Endoh) wrote:
> I think it is not so simple to optimize the double lookup by this API. Consider:
>
...
08:44 AM Ruby trunk Feature #14580: Hash#store accepts a block
sawa (Tsuyoshi Sawada) wrote:
> Why not write `hash[:a]+= 42`?
Good point, but this works only for arithmetic ope...

03/07/2018

04:40 PM Ruby trunk Feature #14580: Hash#store accepts a block
Hanmac (Hans Mackowiak) wrote:
> ~~~ ruby
> hash.transform_values(:a, :b) { |val| val + 42 }
> hash[:a] #=> 44
> ...
04:25 PM Ruby trunk Feature #14580: Hash#store accepts a block
Eregon (Benoit Daloze) wrote:
> What should happen if the given key doesn't exist in Hash?
> This looks like a comp...
04:21 PM Ruby trunk Feature #14580: Hash#store accepts a block
Hi Robert,
Thank you for your reply. You understood everything correctly.
Also, I might be wrong, but it seems ...

03/06/2018

03:42 PM Ruby trunk Feature #14580 (Open): Hash#store accepts a block
Given a hash
~~~ ruby
hash = { a: 2 }
~~~
I want to update a single value in the hash:
~~~ ruby
hash[:a] ...

08/18/2017

10:59 AM Ruby trunk Bug #13827 (Open): Improve performance of `Base64.urlsafe_encode64`
Improve performance of `Base64.urlsafe_encode64` by avoiding unnecessary memory allocations. This may seem insignific...

04/12/2016

09:46 AM Ruby trunk Bug #12238: Logger writes progname if log message is nil
Thanks
I see that it is supposed to be like this. Seems a bit weird though.

03/31/2016

07:13 PM Ruby trunk Bug #12238 (Rejected): Logger writes progname if log message is nil
Please consider the following example:
``` ruby
logger = Logger.new($stdout)
# Log message is nil
logger.info...

Also available in: Atom