General

Profile

Nakilon (Victor Maslov)

  • Login: Nakilon
  • Email: nakilon@gmail.com
  • Registered on: 09/22/2010
  • Last sign in: 06/29/2024

Issues

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

Activity

03/13/2022

04:20 PM Ruby Bug #18629 (Closed): block args array splatting assigns to higher scope _ var
``` ruby
v = 1; [[2]].each{ |(v)| }; p v
_ = 1; [[2]].each{ |(_)| }; p _
```
prints
```
1
2
```
You can see here that `v` is still `1` but `_` isn't shadowed properly and is being assigned `2`.
Reproducible from 2.3.8 to 3.0.2 ...
Nakilon (Victor Maslov)

04/01/2021

02:21 PM Ruby Feature #17768: Proposal: Downward assignments
Bidirectional assignments should be implemented to make swapping values:
```
var1, var2 = var2, var1
```
much shorter:
```
var1
vv^^
var2
```
Nakilon (Victor Maslov)

10/06/2020

11:19 AM Ruby Misc #17174: "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
Nakilon (Victor Maslov) wrote:
> docker build - -t temp-ruby2.3.8 --build-arg RUBY_VERSION=2.3.8 --build-arg ALPINE_VERSION=3.8 <Dockerfile
Also tried the same version of Alpine but higher Ruby -- ruby:2.4.6-alpine3.8 -- got the same...
Nakilon (Victor Maslov)

09/16/2020

05:29 AM Ruby Misc #17174 (Feedback): "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
My native extension gem compiles fine with all versions of Ruby on macOS but only with Ruby 2.3 on Alpine. It throws various `Error relocating`, `symbol not found` when I require the `.o` file. Here I made a branch to reproduce it in Doc... Nakilon (Victor Maslov)

06/04/2019

03:45 PM Ruby Bug #13018: end of file reached (EOFError) from SMTP
Excuse me, why isn't it fixed in 2.4? Does it break something?
I've probably misconfigured ports around my docker environment (it's yet to be investigated) and was now very confused with this. Had to run the program a lot of times, rese...
Nakilon (Victor Maslov)

05/19/2016

10:15 AM Ruby Feature #3944: Add Fiber#root? method
> It might indeed be EM-specific.
I didn't use EM and not going to in the case I've described above.
Nakilon (Victor Maslov)

03/11/2016

06:32 PM Ruby Feature #3944: Add Fiber#root? method
For example, the Facebook Graph API server accepts POST request to calculate smth heavy and returns id of the 'async job'. Then I GET status until it's "complete" and then I GET the actual result.
To process thousands of requests I ca...
Nakilon (Victor Maslov)

09/05/2015

01:25 AM Ruby Bug #11509: Incorrect fraction_digits calculation in lib/rss/rss.rb:41 Time#w3cdtf
**Sorry for broken markdown -- here I fixed it:**
Current code is:
~~~ruby
def w3cdtf
if usec.zero?
fraction_digits = 0
else
fraction_digits = Math.log10(usec.to_s.sub(/0*$/, '').to_i).floor + 1
end
...
Nakilon (Victor Maslov)
01:23 AM Ruby Bug #11509 (Closed): Incorrect fraction_digits calculation in lib/rss/rss.rb:41 Time#w3cdtf
Current code is:
~~~ruby
fraction_digits = Math.log10(usec.to_s.sub(/0*$/, '').to_i).floor + 1
~~~
This makes time to lose as many digits, as there are zeros right after dot:
~~~diff
< <dc:date>2014-03-04T07:37:...
Nakilon (Victor Maslov)

07/16/2014

02:03 PM Ruby Bug #7877: E::Lazy#with_index should be lazy
Is it somehow related? http://stackoverflow.com/q/24782712/322020
... .lazy ... .take_while.with_index{ ...
ArgumentError - tried to call lazy take_while without a block:`
Nevermind, swaping the chain in this way .with_index.take_wh...
Nakilon (Victor Maslov)

Also available in: Atom