General

Profile

sawa (Tsuyoshi Sawada)

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

Issues

Activity

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}
#=> ...
02:23 AM Ruby trunk Feature #15143 (Closed): Extend `Enumerable#to_h`
Often, we call `Array#to_h` to the result of `Enumerable#map`:
```ruby
(1..5).map{|x| [x, x ** 2]}.to_h
#=> {1=...

09/06/2018

03:51 AM Ruby trunk Bug #15078: Hash splat of empty hash should not create a positional argument.
It is also related to
https://bugs.ruby-lang.org/issues/11860
https://bugs.ruby-lang.org/issues/12022
https://bugs...

07/31/2018

07:28 AM Ruby trunk Feature #14951: New operator to evaluate truthy/falsy/logical equivalence
I propose to extend the exclusive or operator `^` to be defined on `Object`. For `Integer`, the method would be overw...

07/17/2018

09:00 AM Ruby trunk Feature #14913: Extend case to match several values at once
Perhaps, you can redefine `Array#===` and use arrays in the following way:
```ruby
case [x, y]
when [0..10, 0..1...

Also available in: Atom