General

Profile

Strech (Sergey Fedorov)

  • Login: Strech
  • Registered on: 01/10/2016
  • Last sign in: 07/15/2026

Issues

open closed Total
Assigned issues 0 1 1
Reported issues 0 2 2

Activity

06/26/2026

05:37 PM Ruby Revision 21550570 (git): Reduce `Array#include?` allocations for literals
Strech (Sergey Fedorov)
04:37 PM Ruby Feature #22131: Avoid array allocation in `Array#include?` on literal arrays
nobu (Nobuyoshi Nakada) wrote in #note-1:
> Also `putnil` could be optimized.
PR is adjusted and green. Thanks for the suggestion
Strech (Sergey Fedorov)
02:54 PM Ruby Feature #22131: Avoid array allocation in `Array#include?` on literal arrays
nobu (Nobuyoshi Nakada) wrote in #note-1:
> Also `putnil` could be optimized.
Yes, I thought about it, but decide to start small, I'm going to add it
**UPD:** Added in [2c368383572](https://github.com/ruby/ruby/pull/17496/changes/2c368...
Strech (Sergey Fedorov)
12:54 PM Ruby Feature #22131 (Closed): Avoid array allocation in `Array#include?` on literal arrays
I've noticed that `Array#include?` on a literal array of frozen-shareable elements (Integers, Symbols, true/false/nil, frozen String literals) compiles the receiver to `duparray`, which allocates a fresh `Array` copy on every call — even... Strech (Sergey Fedorov)

11/18/2021

01:15 PM Ruby Feature #18287: Support nil value for sort in Dir.glob
nobu (Nobuyoshi Nakada) wrote in #note-14:
> Applied in changeset commit:git|89b440bf724b5e670da0fa31c36a7945a7ddc80f.
> ...
I understand that my code wasn't optimal due to codebase knowledge, but I thought that I will have a chance to...
Strech (Sergey Fedorov)
12:14 PM Ruby Feature #18287: Support nil value for sort in Dir.glob
Ruby PR: https://github.com/ruby/ruby/pull/5142
Ruby specs PR: https://github.com/ruby/spec/pull/899
Strech (Sergey Fedorov)
09:36 AM Ruby Feature #18287: Support nil value for sort in Dir.glob
matz (Yukihiro Matsumoto) wrote in #note-10:
> We have never made a consensus that `nil` represents the default value. So we should only accept boolean (true or false) for the value.
> ...
Amazing, will adjust my PR, thanks a lot!
Strech (Sergey Fedorov)

11/06/2021

01:25 PM Ruby Feature #18287: Support nil value for sort in Dir.glob
Eregon (Benoit Daloze) wrote in #note-8:
> ```ruby
> ...
I would love to see that explicit behavior in `Dir.glob`, which in my opinion would be less surprising and more straightforward.
Strech (Sergey Fedorov)

11/04/2021

08:47 AM Ruby Feature #18287 (Closed): Support nil value for sort in Dir.glob
Good day, everyone.
I would like to suggest (or question) the support of a `nil` value for `sort` argument in `Dir.glob`.
I find this behaviour a bit surprising, here is an example:
```
irb(main):001:0> Dir.glob("brace/a{.js,*}",...
Strech (Sergey Fedorov)

Also available in: Atom