jruby
jruby copied to clipboard
JIT transition may recreate once-only literal values
When transitioning from the interpreter to the JIT, we may end up recreating literal values that are expected to only be created and cached once. This includes but is not limited to:
- "Once" regular expressions
- Frozen strings (#7713)
- Literal-bounded ranges (#8019)
Code that expects these objects to only be created once may break as a result. However, this rarely comes up in user code and most of these cases have been found while running specs and tests explicitly checking this "only once" behaviors.