General

Profile

zverok (Victor Shepelev)

Issues

open closed Total
Assigned issues 0 20 20
Reported issues 19 104 123

Projects

Project Roles Registered on
Ruby Committer 01/17/2022

Activity

08/26/2025

04:23 PM Ruby Feature #12282: Hash#dig! for repeated applications of Hash#fetch
I'll allow myself to copy-paste my reasoning from the related ticket #14602:
Just a bit of "design space" analysis:
1. I think `dig!` is unusual for core Ruby. A lot of Rubyists are used that in Rails pairs like `find_by`/`find_by!...
zverok (Victor Shepelev)

07/16/2025

05:50 AM Ruby Feature #21386: Introduce `Enumerable#join_map`
Just a thought: shouldn't we add `#join` to `Enumerator::Lazy`? It wouldn't solve "logical repetitiveness" of the pattern, but might be a good _and_ idiomatic way to optimize the pattern when necessary.
(Lazy enumerators are underused...
zverok (Victor Shepelev)

06/14/2025

02:39 PM Ruby Feature #21435: Kernel#then_try as a conditional #then
@Alexander.Senko I don't think my opinion weights much here, but here it is, nevertheless.
When writing in "chaining" style (which I know is not everybody's favorite), "do this transformation/next step conditionally" is indeed a frequ...
zverok (Victor Shepelev)

05/31/2025

04:42 PM Ruby Feature #21387: Proposal to add Data#[]
> However, I'm still curious why I've come up with this `#[]` idea.
> ...
I am not sure about this argument. The "can be initialized with keyword arguments" and "can be converted to Hash" are probably the most common features among all ...
zverok (Victor Shepelev)
07:16 AM Ruby Feature #21387: Proposal to add Data#[]
The design goal of `Data` was to be as close to "just a simple atomic object" as possible and convenient. It is a "value object," not a "container". `#[]` is closer to a container protocol and starts to erode the design.
For a partic...
zverok (Victor Shepelev)

04/15/2025

06:05 AM Ruby Feature #21264: Extract Date library from Ruby repo in the future
> I think an important question is whether the simplified Date should be ::Date, or something like ::Time::Date. One issue with making the simplified version ::Date is it opens up backwards compatibility issues for code that uses feature... zverok (Victor Shepelev)

04/11/2025

03:51 PM Ruby Feature #21264: Extract Date library from Ruby repo in the future
Is it possible to, on the contrary, make Date a core class? Rails, and many other non-Rails codebases I saw, implicitly consider it as such (while kind-of ignoring DateTime, or considering it the "main" time-representing class even when ... zverok (Victor Shepelev)

01/13/2025

03:18 PM Ruby Feature #20953: Array#fetch_values vs #values_at protocols
> What's the expected behavior of:
For `..42` versions, I believe that `values_at` behavior gives enough affordance:
```ruby
[1, 2, 3].values_at(..6)
#=> [1, 2, 3, nil, nil, nil, nil]
```
So, I suppose:
```ruby
[1, 2, 3].fetch_...
zverok (Victor Shepelev)

01/12/2025

08:23 AM Ruby Bug #21030: Bug: #step with Range<ActiveSupport::Duration> behavior broken on Ruby 3.4.1
Confirmed, looking into it. zverok (Victor Shepelev)
08:20 AM Ruby Bug #21026: `def __FILE__.a; end` should be a syntax error
As far as I understand (though it is an intuitive understanding, not backed by looking into particular implementation), `__FILE__` and `__LINE__` are handled at the parsing stage, behaving in (almost) all situations like there was just a... zverok (Victor Shepelev)

Also available in: Atom