General

Profile

sferik (Erik Berlin)

  • Login: sferik
  • Email: sferik@gmail.com
  • Registered on: 02/28/2011
  • Last sign in: 10/28/2026

Issues

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

Activity

11/09/2026

07:12 AM Ruby Revision 39c3c361 (git): [ruby/json] Java generator: call as_json only once for invalid
strings
(https://github.com/ruby/json/pull/1127)
When a string with invalid encoding is generated in strict mode, the
Java and pure-Ruby generators call as_json on it. If as_json returned
a Symbol, the Symbol was turned back into the sa...
sferik (Erik Berlin)

11/05/2026

08:39 PM Ruby Revision a17ffc31 (git): [ruby/json] Java generator: raise TypeError for a String key whose to_s is broken
When a Hash key is a String subclass, both generators call its to_s.
generator.c raises a TypeError in convert_string_subclass if to_s
doesn't return a String. The Java generator passed the result on, then
fell back to TypeConverter.conv...
sferik (Erik Berlin)
08:38 PM Ruby Revision cd73168f (git): [ruby/json] Run the RFC 8785 number tests on JRuby 10.1.3 and later
The RFC 8785 number formatter uses Float#to_s, so these tests were
skipped on every engine but CRuby. JRuby 10.1.3 gives the shortest
round-trip digits in Float#to_s
(https://github.com/jruby/jruby/pull/9916), and all 26 tests pass
there...
sferik (Erik Berlin)

10/21/2026

06:56 PM Ruby Revision 4ba4954d (git): Fix Range#include? of an empty range of single characters
A range of single character Strings told that it includes its end
even when it is empty, since the end was not compared with the begin.
("z".."a").to_a #=> []
("z".."a").include?("a") #=> true
(cherry picked from commi...
sferik (Erik Berlin)

10/20/2026

07:12 PM Ruby Revision c71329d4 (git): [ruby/io-console] Keep IO#isatty an alias of IO#tty? on JRuby
The C extension defines both tty? and isatty in IO::platform_tty, so
they stay the same method once io/console is loaded. The JRuby
backends' PlatformTty only defined tty?, so after
https://github.com/ruby/io-console/commit/f686b8305 loa...
sferik (Erik Berlin)

10/19/2026

08:33 PM Ruby Feature #22446: Speed up several core methods in Array, Range, String, Integer, Float and Time
The [neighbor](https://github.com/ankane/neighbor) gem is another example, commonly used by Rails apps to store embeddings with pgvector. pgvector's wire format is text, so `Neighbor::Type::Vector#serialize` does `"[#{value.to_a.map(&:to... sferik (Erik Berlin)

10/17/2026

04:21 AM Ruby Revision 26a4d835 (git): Fix Range#include? of an empty range of single characters
A range of single character Strings told that it includes its end
even when it is empty, since the end was not compared with the begin.
("z".."a").to_a #=> []
("z".."a").include?("a") #=> true
(cherry picked from commi...
sferik (Erik Berlin)

10/16/2026

10:14 PM Ruby Feature #22446: Speed up several core methods in Array, Range, String, Integer, Float and Time
> I'll second Jean, we should absolutely not do this. Im also eager to replace dtoa.c, but if we're changing the algorithm (and especially if that changes the output in any cases) we should do it at most once over the next ~5 years.
T...
sferik (Erik Berlin)
06:05 PM Ruby Feature #22446: Speed up several core methods in Array, Range, String, Integer, Float and Time
> This one is interesting because a large part of the complexity of the implementation is caused by the semantic of these methods is that the comparison is done as element == searched_item.
> ...
This comment inspired another optimizati...
sferik (Erik Berlin)
06:02 PM Ruby Bug #22432: Range#include? returns true for the end of an empty range of single-character Strings
### Backport PRs
3.3: https://github.com/ruby/ruby/pull/19395
3.4: https://github.com/ruby/ruby/pull/19396
4.0: https://github.com/ruby/ruby/pull/19397
sferik (Erik Berlin)

Also available in: Atom