General

Profile

AMomchilov (Alexander Momchilov)

  • Login: AMomchilov
  • Registered on: 06/15/2021
  • Last sign in: 12/07/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 4 3 7

Activity

07/28/2025

06:43 PM Ruby Bug #21139: Prism and parse.y parses `it = it` differently
@jeremyevans0 I see your point about how ivars take precedence over methods of the same name, but I think `it` is more like a block argument (well, a local variable) than a method, so I find this inconsistently really surprising:
```sh
...
AMomchilov (Alexander Momchilov)

04/21/2025

08:22 PM Ruby Feature #21279 (Closed): Bare "rescue" should not rescue NameError
# Abstract
Bare `rescue` keywords (either as a modifier like `foo rescue bar` or as clause of a `begin` block) should _not_ rescue `NameError` or `NoMethodError`.
This behaviour is unexpected and hides bugs.
## Background
Man...
AMomchilov (Alexander Momchilov)

01/12/2025

12:09 AM Ruby Revision fa1427a6 (git): [ruby/prism] Enable implicit fall-through errors
https://github.com/ruby/prism/commit/03797b84d3 AMomchilov (Alexander Momchilov)

12/12/2024

04:51 PM Ruby Feature #20818: Allow passing a block to Hash#store (to update current value)
This is related to my `Hash#exchange_value` proposal, so I'll link that here. https://bugs.ruby-lang.org/issues/20300
I guess the difference is whether you already know the replacement you want to use instead, or if you'd like to comp...
AMomchilov (Alexander Momchilov)

08/26/2024

06:08 PM Ruby Bug #20700 (Feedback): `warn_cr_in_shebang()` doesn't fire if there's no `\n`
The `warn_cr_in_shebang()` function looks for `\r\n` together, but the `\r` should emit a warning, regardless if there's also a `\n` or not.
```ruby
#!/usr/bin/ruby
require "tempfile"
require "open3"
def run_rb(ruby_src)
pu...
AMomchilov (Alexander Momchilov)

07/27/2024

11:03 PM Ruby Bug #20079: alexandria testsuite began to segfault recently
vo.x (Vit Ondruch) wrote in #note-13:
> This does not help testing with Ruby 3.3.2
Hmmm that's a bit surprising. Thanks for taking the time to try that.
Ok, let's go a bit more conservative, could you please test again with my [...
AMomchilov (Alexander Momchilov)

05/11/2024

04:21 PM Ruby Feature #20300: Hash: set value and get pre-existing value in one call
mame (Yusuke Endoh) wrote in #note-24:
> It was originally intended as a method to improve the efficiency of `Set#add?`, but the use case was shifted to a method for thread safety. This history makes the use case less persuasive.
T...
AMomchilov (Alexander Momchilov)

03/15/2024

01:49 AM Ruby Feature #20300: Hash: set value and get pre-existing value in one call
nobu (Nobuyoshi Nakada) wrote in #note-17:
> I want `ENV.exchange_value` rather than `Hash#exchange_value`.
Is there a reason to put it on `ENV`, but *not* on `Hash`? That seems like a needless restriction to me.
AMomchilov (Alexander Momchilov)
01:34 AM Ruby Bug #20301: `Set#add?` does two hash look-ups
shyouhei (Shyouhei Urabe) wrote in #note-8:
> Why not:
Because I didn't think of that :)
I would be okay with it, but I think the thread safety issue is also worth solving. The implementation I'm proposing solves both the performa...
AMomchilov (Alexander Momchilov)

02/27/2024

09:30 PM Ruby Feature #20300: Hash: set value and get pre-existing value in one call
@matheusrich Thanks for putting together that list!
In general, I like the idea of having this method support an optional block, but we would need to benchmark it to ensure it doesn't have an undesired slow down in the `exchange_value(:...
AMomchilov (Alexander Momchilov)

Also available in: Atom