enebo on new_sprintf
"%1" was an infinite loop Some more literal '%' cases Fixes '%+.2d' zero padding and 2 more (compare)
include Javawould trigger
require 'java'if it had not already been loaded, but in all recent JRuby versions it's already there. The difference comes in where you actually
include; whatever module you
include Javainto will gain some peculiar side effects of our module/package logic that lives in the
include Javanow, and use
require 'java'only as future-proofing in case we don't load it by default some day.
I think I have a definitive proof of JRuby's
Thread.current object changing in the middle of a process run... Like, local block-level variables remain the same, everything works as expected, but
Thread.current is completely different (different ruby object instance, different
object_id, different thread-local contents, etc) at the end of the method compared to the value at the beginning of the same method. This completely breaks my mental model of how computers work. Anybody else seen or experience anything like that?
P.S. In case it is relevant:
at_exitblock is used to set the
Thread.listat the end of the method contains a single value in each thread - the new thread object for each thread. Meaning in each of 4 worker threads
Thread.list == [Thread.current]