The implementation of WeakMap on JRuby probably behaves the same, because it uses weak references that are only cleaned along certain code paths. As you (@eregon) know, the JVM GC will vacate weak references, but handling the now-dead...headius (Charles Nutter)
Popping back in to say I support the Fiber-isolated direction here but don't have strong opinions about the potential breaking cases. I've disliked supporting these variables for years so anything we can do to limit their scope is ok by ...headius (Charles Nutter)
Oh, it's also worth pointing out that there are Regexp method equivalents of each of the special backref variables (`last_match` etc). They are less commonly used, I believe, and usually called directly on Regexp, but that's another exam...headius (Charles Nutter)
> it's easy to know if a method access these special variables (getspecial instruction), That is not sufficient. There are methods that read *and* write these special variables without the user ever accessing the literal globals. ...headius (Charles Nutter)
> I've always considered this a bug. If possible they should definitely be scoped to the current thread (or rather fiber?). I prototyped this for JRuby some years ago, and I believe Rubinius (and perhaps TruffleRuby) implemented it this...headius (Charles Nutter)
## Problem Several Regexp-matching methods currently write (and sometimes read) the implicit "backref" `$~` variable in the local frame (and related variables like `$'`). Several IO methods read or write the "last line" `$_` variab...headius (Charles Nutter)
JRuby does not by default trap `SIGINT` to raise `Interrupt`, since that would interfere with the JVM's own clean shutdown connected to `SIGINT` by default. Users can opt into that behavior if they want. If a JRuby user traps `SIGINT`...headius (Charles Nutter)
Related discussions in https://bugs.ruby-lang.org/issues/16150 where I proposed a way to request frozen strings from `to_s`. I've always been +1 for all immediate values that return the same string content every time to return frozen str...headius (Charles Nutter)