summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-02-01 11:10:22 -0800
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-04-22 15:09:16 +0900
commita98c72a313483e1a0baebe99d2534904c19faf1f (patch)
tree6bb274744fd2edb245dfa6691aa6f8fc08cf410d /java/src
parent2a42c646a963ce559d20618e94a78244f799d376 (diff)
downloadjson-a98c72a313483e1a0baebe99d2534904c19faf1f.tar.gz
Fix GC compatibility: Don't stash encodings in global constants
This value should either be pinned, or looked up when needed at runtime. Without pinning, the GC may move the encoding object, and that could cause a crash. In this case it is easier to find the value at runtime, and there is no performance penalty (as Ruby caches encoding indexes). We can shorten the code, be compaction friendly, and incur no performance penalty.
Diffstat (limited to 'java/src')
0 files changed, 0 insertions, 0 deletions