General

Profile

sawa (Tsuyoshi Sawada)

  • Registered on: 04/27/2011
  • Last connection: 10/18/2018

Issues

Activity

12/05/2018

08:28 AM Ruby trunk Feature #15381: Let double splat call `to_hash` implicitly
Sorry, I meant `to_h`, not `to_hash`.
And in case my intention was not clear, in the example I gave for the double...
08:25 AM Ruby trunk Feature #15381 (Open): Let double splat call `to_hash` implicitly
The single splat calls `to_a` implicitly on the object (if it is not an array already) so that, for example, we have ...

11/29/2018

12:26 AM Ruby trunk Feature #10771: An easy way to get the source location of a constant
I am glad that this issue is going to be discussed in the next developer meeting, but now that we have a way to know ...

11/28/2018

12:19 PM Ruby trunk Feature #15352: Mandatory block parameters
I don't find this feature useful. If you wanted to raise an error when no block is given, all you have to do is call ...

10/18/2018

06:12 AM Ruby trunk Feature #15231: Remove `Object#=~`
I agree. At the same time, the `String=~` behaviour:
>str =~ obj → integer or nil click to toggle source
Match—If...

09/21/2018

02:23 AM Ruby trunk Feature #15143: Extend `Enumerable#to_h`
nobu (Nobuyoshi Nakada) wrote:
> OK, not only `Enumerable`, but `Array`, `Hash`, `ENV`, `NilClass` and `Struct` too?...

09/20/2018

07:32 AM Ruby trunk Feature #15143: Extend `Enumerable#to_h`
Matz, thanks for confirmation. I am happy with my original proposal.
07:14 AM Ruby trunk Feature #15143: Extend `Enumerable#to_h`
mame (Yusuke Endoh) wrote:
> If the block returns an array whose length is > 2, how does it behave?
>
> ```
> %w...
06:54 AM Ruby trunk Feature #15143: Extend `Enumerable#to_h`
Sorry that I missed the previous duplicate proposals (I found that I had even commented on one of them, which I had f...
02:27 AM Ruby trunk Feature #15143: Extend `Enumerable#to_h`
I forgot to mention that people alternatively do:
```ruby
(1..5).each_with_object({}){|x, h| h[x] = x ** 2}
#=> ...

Also available in: Atom