General

Profile

janko (Janko Marohnić)

  • Login: janko
  • Email: janko@hey.com
  • Registered on: 02/05/2014
  • Last sign in: 04/29/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 9 10

Activity

12/25/2022

11:52 PM Ruby Bug #19258: URI::Generic#host returns empty string instead of nil
Thanks or the update, makes sense, I will try to get Excon updated then. janko (Janko Marohnić)
11:25 PM Ruby Bug #19258 (Closed): URI::Generic#host returns empty string instead of nil
On Ruby 3.1, `URI::Generic#host` would return `nil` for `unix:///` URLs, but on Ruby 3.2 it now returns an empty string:
```rb
uri = URI.parse("unix:///var/run/docker.sock")
uri.host #=>
# Ruby 3.1: nil
# Ruby 3.2: ""
```
Thi...
janko (Janko Marohnić)

12/27/2020

12:40 PM Ruby Bug #17481 (Closed): Keyword arguments change value after calling super without arguments in Ruby 3.0
There seems to be a bug in Ruby 3.0 regarding keyword arguments and calling super without arguments, where the splatted variable changes its value after super is called. The following self-contained example reproduces the issue:
``` r...
janko (Janko Marohnić)

07/07/2018

05:07 PM Ruby Feature #14426: [PATCH] openssl: reduce memory allocation in OpenSSL::Buffering#do_write
The patch got outdated in the latest trunk, so I updated it again. It's a really small change with big impact on memory usage when uploading files. janko (Janko Marohnić)
09:47 AM Ruby Bug #14900 (Closed): Extra allocation in String#byteslice
When executing `String#byteslice` with a range, I noticed that sometimes the original string is allocated again. When I run the following script:
~~~ ruby
require "objspace"
string = "a" * 100_000
GC.start
GC.disable
generati...
janko (Janko Marohnić)

07/03/2018

11:07 PM Ruby Feature #13626: Add String#byteslice!
I support adding `String#byteslice!`. I've been using `String#byteslice` in custom IO-like objects that implement `IO#read` semantics, as the strings I work with don't necessarily have to be in binary encoding (otherwise I'd just use `St... janko (Janko Marohnić)

05/17/2018

12:28 PM Ruby Bug #14745: High memory usage when using String#replace with IO.copy_stream
> it looks like @stream_cipher.update can take a second destination arg (like IO#read and friends) and maybe that helps... (that appears to be OpenSSL::Cipher#update)
Cool, I didn't know that! Thanks, this allowed me to greatly simpli...
janko (Janko Marohnić)

05/16/2018

09:33 AM Ruby Bug #14745: High memory usage when using String#replace with IO.copy_stream
> Yes, this is an unfortunate side effect because of copy-on-write
> ...
That makes sense, thanks for the explanation.
> The other part could be anything using IO#write could create
> ...
This is on Ruby 2.5.1, so I'm guessing it do...
janko (Janko Marohnić)

05/09/2018

12:50 PM Ruby Bug #14745 (Closed): High memory usage when using String#replace with IO.copy_stream
I'm using custom IO-like objects that implement #read as the first argument to IO.copy_stream, and I noticed odd memory behaviour when using String#replace on the output buffer versus String#clear. Here is an example of a "fake IO" objec... janko (Janko Marohnić)

04/18/2018

01:16 PM Ruby Feature #14426: [PATCH] openssl: reduce memory allocation in OpenSSL::Buffering#do_write
Any updates on this one? I think it would be nice to have this included in the next patch version. This will make memory usage during large file uploads consistent regardless of whether it's going to HTTP or HTTPS endpoint; currently upl... janko (Janko Marohnić)

Also available in: Atom