Commit fe362be
authored
ZJIT: Avoid mutating string in zjit stats (ruby#14485)
[ZJIT] Avoid mutating string in zjit stats
GitHub runs with a Symbol patch that causes a frozen string error when
running `--zjit-stats`
```rb
Class Symbol
alias_method :to_s, :name
end
```
I remember hearing that Shopify runs a similar patch, and that we might
try to make this the default behavior in Ruby some day.
Any chance we can avoid mutating the string here in case it's frozen?
That does mean we'll end up making some extra strings when it's not
frozen, but I think that's OK for printing stats.1 parent ce94add commit fe362be
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
0 commit comments