Closed eregon closed 2 weeks ago
- The only case where an exact class check is needed so far is for String
That's the one case where we had a failing test for it, but does that mean we should special case it?
I'm open to say only String subclasses have that behavior, but then all 3 implementations should match behavior. Could you add some tests to make sure we converge them?
Also I'm very surprised .class
is this expensive on Truffle, I wouldn't have expected it.
I'll rebase and see if the added tests fail on this PR or if they are fine.
Tests seem to pass after rebase from a local test run.
obj.class
is significantly slower: https://github.com/ruby/json/pull/668#issuecomment-2450747190