General

Profile

decuplet (Nikita Shilnikov)

  • Login: decuplet
  • Email: fg@flashgordon.ru
  • Registered on: 06/30/2014
  • Last sign in: 04/13/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 7 8

Activity

02/03/2025

01:58 AM Ruby Revision e8cf4414 (git): [ruby/weakref] Add missing block parameter
A block is part of the Delegator's contract. Ruby 3.4 issues a warning if a block is passed but unused. This commit fixes the warning by adding a block to the argument list.
https://github.com/ruby/weakref/commit/9495ec9191
decuplet (Nikita Shilnikov)

01/04/2025

01:41 PM Ruby Bug #21003 (Closed): unexpected warning about ignored block
I stumbled upon this during the upgrade to 3.4. Here's the minimal repro:
```ruby
$VERBOSE = true
def foo(*, &block) = block
def bar(buz, ...) = foo(buz, ...)
bar(:test) {}
```
It gives
```
ruby reproduce.rb
reproduce.rb:...
decuplet (Nikita Shilnikov)

09/13/2021

09:11 AM Ruby Feature #17355: Using same set of names in or-patterns (pattern matching with Foo(x) | Bar(x))
> I'm confused by this code:
Actually, I'm too! The goal of this request doesn't go beyond having support for
```ruby
case [1, 2]
in [1, a] | [a, 3] then a
end
```
The `=> a` is probably a leftover, I don't recall the reason...
decuplet (Nikita Shilnikov)

09/12/2021

10:47 AM Ruby Feature #17355: Using same set of names in or-patterns (pattern matching with Foo(x) | Bar(x))
It'd be nice to have this in 3.1 (no pushing). decuplet (Nikita Shilnikov)

06/14/2021

08:35 AM Ruby Bug #17951: Collisions in Proc#hash values for blocks defined at the same line
It was there since 1.9 as far as I can see https://github.com/ruby/ruby/commit/a3e1b1ce7ed7e7ffac23015fc2fde56511b30681#diff-2672918174f926386106967d117f11da8aa1905772dcf48fce53694386e4a666R658-R668 decuplet (Nikita Shilnikov)

06/12/2021

11:59 PM Ruby Bug #17951 (Closed): Collisions in Proc#hash values for blocks defined at the same line
```ruby
require 'set'
def capture(&block)
block
end
# it creates 1k of same blocks
blocks = Array.new(1000) { capture { :foo } }
hashes = blocks.map(&:hash).uniq
ids = blocks.map(&:object_id).uniq
equality = blocks.map {...
decuplet (Nikita Shilnikov)

01/25/2021

01:00 PM Ruby Feature #17579: [Proposal] A suggestion for newline-separated shorthand notation, for the creation of Arrays containing strings that may contain ' ' (space) characters
Didn't have time to read it fully but you can escape spaces:
```
2.7.1 :001 > %w(foo\ bar baz)
=> ["foo bar", "baz"]
```
Another option
```ruby
options = <<~EOF.lines.map(&:strip)
choice 1
choice 2
choice 3
choice 4
...
decuplet (Nikita Shilnikov)

11/30/2020

06:42 PM Ruby Feature #17355: Using same set of names in or-patterns (pattern matching with Foo(x) | Bar(x))
Dan0042 (Daniel DeLorme) wrote in #note-1:
> Or-patterns _are_ supported, just not with variable assignment. I agree with the request but the title of the ticket is a bit misleading.
Yeah, thanks, I updated the title.
Dan0042 (D...
decuplet (Nikita Shilnikov)

11/29/2020

07:41 PM Ruby Feature #17355 (Assigned): Using same set of names in or-patterns (pattern matching with Foo(x) | Bar(x))
Given pattern matching is officially supported in Ruby 3, I have an idea about making it more flexible.
Currently, this piece of code produces a syntax error
```ruby
case [1, 2]
in [1, a] | [a, 3] => a then a
end # duplicated vari...
decuplet (Nikita Shilnikov)

06/19/2020

12:38 PM Ruby Bug #16771: Segmentation fault when inspecting a bound method
@jeremyevans0 was this fixed? I can't find any references to this issue from the repo, perhaps I'm missing something. decuplet (Nikita Shilnikov)

Also available in: Atom