-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: Sequel's literals contain additional quotation marks under JRuby 9k head but not under pre2 #2976
Comments
Huh, what a weird one. I imagine we're calling some method to coerce the string that C Ruby does not, and it is producing these quotes...but that's just a guess. |
I could not reproduce running the file directly...is that what you mean about it not reproducing all the time?
|
Now with
Anyway, take a look at Sequel's Travis => https://travis-ci.org/jeremyevans/sequel/jobs/63967115 |
Ugh, that makes even less sense. Ok, thanks. |
I tried running the code that fails in a loop and discovered that either every iteration fails or no iterations fail. This is consistent up to 10000 iterations. So something is getting tweaked early on that causes it to format differently forever. |
It seems that somehow, some runs are not using a LiteralString for the
|
@deepj Thanks for the report...this would have been a really weird bug to hunt down in production if we had released it. The problem here was that we were overzealously attempting to deduplicate string keys in hashes. Where MRI only does it for literal strings in a literal hash, we were doing it for all strings going into hash keys. In addition, our deduplication logic had a critical flaw, allowing non-natural strings (e.g. subclasses like Sequel::LiteralString) to participate in deduplication. The two issues combined in a wacky way:
The fix for now was to remove our overzealous string deduplication and make the dedup cache as strict as it's supposed to be (only natural Strings). I filed #2990 to cover the re-application of dedup optimizations that MRI has decided are safe for Ruby semantics. |
@headius Great! To issue: Just wow. It is a bit sad I can't help more than only reporting issues :( Anyway, more reports are under way :) |
This is a weird bug. Sometimes it is not possible reproduce and conversely.
How to reproduce:
The text was updated successfully, but these errors were encountered: