You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems there is a barely visible yet significant difference to resolve in parsing. Ruby 3.1 uses escape_Qundef which will look to see if the value is Qundef and if so replace it with nil. Otherwise it uses the value passed. In this particular case it passes '0' which I think becomes false.
In JRuby, we pass null and our escape_Qundef looks at null and makes nil and not false. Since there are many callers of escape_Qundef I need to figure out what I need to do to fix this.
The text was updated successfully, but these errors were encountered:
Blerg. So my problem is we just use null all over the .y file and this is fine for regular parsing. In ripper they differentiate
by Qnone and Qnull. There are still random 0 for NULL but those as far as I can tell only affect parsing pieces of parse.y.
The work to fix this is to audit the entire grammar file and match up the Qnone and Qnull. The extra twist to all this is that Qnull is Qundef (which gets translated to false during dispatch). Why not just false? I suspect this is that Qundef leaks into values another way.
The extra extra wrinkle is that signatures need a Qnone and ripper and ruby both will have different values for it but n Java signatures have parameters which have to accept these values and those parameters have differing Java types. To do this correctly I would need n Qnone types and n Qnull types which have differing types between ripper and ruby but would at least properly type to the methods which accept them OR I can just make all parameters accepting these values as Object then runtime cast the value in the method which accepts them.
It should be:
It seems there is a barely visible yet significant difference to resolve in parsing. Ruby 3.1 uses escape_Qundef which will look to see if the value is Qundef and if so replace it with nil. Otherwise it uses the value passed. In this particular case it passes '0' which I think becomes false.
In JRuby, we pass null and our escape_Qundef looks at null and makes nil and not false. Since there are many callers of escape_Qundef I need to figure out what I need to do to fix this.
The text was updated successfully, but these errors were encountered: