General

Profile

ko1 (Koichi Sasada)

  • Login: ko1
  • Registered on: 05/28/2008
  • Last sign in: 07/02/2026

Issues

open closed Total
Assigned issues 78 652 730
Reported issues 15 205 220

Projects

Project Roles Registered on
Ruby Committer 05/28/2008

Activity

Today

08:39 AM Ruby Revision 03d8b94e (git): Fix flaky TCPSocket#local_address implicit-hostname spec
The "using an implicit hostname" example connects with TCPSocket.new(nil,
port) to a server bound to the IPv4 loopback, then asserts that
local_address.ip_address equals @host ("127.0.0.1"). This is flaky.
A nil hostname resolves to the...
ko1 (Koichi Sasada)
02:01 AM Ruby Feature #22132: Scala-like for comprehensions
BTW Elixir has `into: obj` https://elixir.hexdocs.pm/comprehensions.html#the-into-option so if we introduce `Hash#<<`, we can construct a hash with this syntax.
```ruby
for k in %w(foo bar),
v in 1..3 then
["#{k}_#{v}", v]
end int...
ko1 (Koichi Sasada)
01:53 AM Ruby Feature #22132: Scala-like for comprehensions
1. It seems simpler to use `each` with accumulation like that:
```ruby
def foo(n, v)
for i in 0...n,
j in 0...n when i + j == v then
[i, j]
end
end
#=>
def foo(n, v)
_a = []
i = j = nil
(0...n).each do
i = it
...
ko1 (Koichi Sasada)

07/01/2026

08:46 PM Ruby Revision cd54d0f9 (git): Fix flaky TestGc#test_stat_single by disabling GC
test_stat_single fails intermittently:
1) Failure:
TestGc#test_stat_single [test/ruby/test_gc.rb:198]:
<12> expected but was
<13>.
The test reads the full GC.stat hash and then GC.stat(:count) separately
and asserts they are eq...
ko1 (Koichi Sasada)
08:19 PM Ruby Revision 8e6fd8fe (git): fix control flow
`do { ...; continue; } while(0)` doesn't retry the loop body.
pointed out by Coverity Scan and mame.
ko1 (Koichi Sasada)
06:53 PM Ruby Feature #22139: Prohibit `END{}`/`Kernel#at_exit` in non-main Ractor
https://github.com/ruby/ruby/pull/17614 ko1 (Koichi Sasada)
06:22 PM Ruby Feature #22139 (Open): Prohibit `END{}`/`Kernel#at_exit` in non-main Ractor
Let's prohibit `END{}`/`Kernel#at_exit` on non-main Ractor.
The current behavior is strange:
```ruby
Ractor.new{
at_exit{ p [self, Ractor.current] }
}
sleep 1
#=> [#<Ractor:#2 t.rb:2 terminated>, #<Ractor:#1 running>]
`...
ko1 (Koichi Sasada)

06/29/2026

06:21 AM Ruby Feature #22130: Add a new YARV instruction for a `String.new` fast path
How about to introduce `String.new_buffer(capacity)` or some other name if it is important for the performance? ko1 (Koichi Sasada)
02:03 AM Ruby Feature #22132: Scala-like for comprehensions
also this proposal contains extension like `for iter1, iter2 do ... end`? ko1 (Koichi Sasada)
02:00 AM Ruby Feature #22132: Scala-like for comprehensions
just curious: `for ... then` for single iterator will makes `map` behavior like that?
```ruby
for a in ary do
a
end
# ary.each{it}
for a in ary then
a
end
# ary.map{it}
```
ko1 (Koichi Sasada)

Also available in: Atom