General

Profile

jnchito (Junichi Ito)

  • Login: jnchito
  • Registered on: 08/29/2016
  • Last sign in: 02/12/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 4 16 20

Activity

01/21/2026

12:47 AM Ruby Bug #21844: Inconsistent ArgumentError message for Data::define.new
With this PR, Data#initialize now considers index keys when detecting missing keywords:
https://github.com/ruby/ruby/pull/15910
jnchito (Junichi Ito)

01/20/2026

11:12 PM Ruby Bug #21844: Inconsistent ArgumentError message for Data::define.new
I couldn't find the spec, but I found keywords can be index like Array:
```ruby
Data.define(:a, :b).new(0 => 1, 1 => 2)
#=> #<data a=1, b=2>
Data.define(:a, :b).new(-2 => 1, -1 => 2)
#=> #<data a=1, b=2>
```
So the code belo...
jnchito (Junichi Ito)
12:45 PM Ruby Bug #21844: Inconsistent ArgumentError message for Data::define.new
Is this behavior in Ruby 4.0.1 expected?
```ruby
Data.define(:a, :b).new(1 => 1, a: 2)
#=> #<data a=2, b=1>
Data.define(:a, :b).new(1 => 1, b: 2)
#=> #<data a=nil, b=2>
```
I expected ArgumentError to be raised because `1` ...
jnchito (Junichi Ito)
09:35 AM Ruby Bug #21844: Inconsistent ArgumentError message for Data::define.new
I fixed that error as well in my PR:
https://github.com/ruby/ruby/pull/15910/
jnchito (Junichi Ito)
04:59 AM Ruby Bug #21844 (Open): Inconsistent ArgumentError message for Data::define.new
The code below shows `Data::define.new` treats symbol and string keys equivalently:
``` ruby
C = Data.define(:a, :b)
C.new(a: 1, b: 1)
#=> #<data C a=1, b=1>
C.new('a' => 1, 'b' => 1)
#=> #<data C a=1, b=1>
```
But it act...
jnchito (Junichi Ito)

12/22/2024

04:07 AM Ruby Bug #20977: backtick is used for syntax errors related to 'it'
My pull request is here:
https://github.com/ruby/ruby/pull/12424
jnchito (Junichi Ito)
04:04 AM Ruby Bug #20977 (Closed): backtick is used for syntax errors related to 'it'
The following error message uses single quote for "'it'":
```
irb(main):012> [10].each_with_index { p "#{it}:#{_2}" } #=> 10
irb(main):013>
<internal:kernel>:168:in 'Kernel#loop': (irb):12: syntax error found (SyntaxError)
> 12 ...
jnchito (Junichi Ito)

12/25/2022

12:06 AM Ruby Feature #19194: Add Regexp.linear_time?
I feel it would be more natural if it was defined as instance method:
``` ruby
/a/.linear_time?
Regexp.new('a').linear_time?
```
Is there any reason for class method?
jnchito (Junichi Ito)

12/23/2022

02:14 AM Ruby Feature #17097: `map_min`, `map_max`
`max_of` method is very elegant! I really want the Ruby version of this method.
For example, I need to write `column_width = @ls_files.map { |ls_file| ls_file.name.size }.max` to determine column width according to the longest file nam...
jnchito (Junichi Ito)

02/01/2022

11:11 PM Ruby Bug #18436: Fix Pathname dot directory globbing
I noticed this change just now. We have some programs which depended on the previous behavior. It loses backward compatibility, so I think it should have been noted in NEWS.md in Ruby 3.1.0. I understand it's too late to say that, though. jnchito (Junichi Ito)

Also available in: Atom