-
-
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
Order of prepends and extends can break super #4531
Comments
The related tests were added to MRI in ruby/ruby@8e46f40. |
The MRI commit in question does not appear to have been backported to the 2.3 branch, but I have cherry-picked this change there anyway. |
This is still a problem in 9.2, and likely needs my work on the super_fixes branch to work properly. However there are some edges to work out in that branch and it won't be ready for 9.2. Bumping. |
The first example in the description also fails to call the method on MRI, so I'm not sure when that was valid:
The changes I made to cgi/util.rb also do not appear to be necessary to pass all the cgi/util tests. It appears that work in #5627 has made those tweaks unnecessary. |
This was never actually fixed, and my change in 3d8847e just disabled the CGI extension altogether. |
Actually I will open a new bug for this. The primary example case presented above is expected to produce a Showing old behavior and new correct error:
There is, however, some additional problem with the CGI module that is not covered by this bug's reduced example or the fixes that resolved it. Restoring the CGI logic that combines |
In debugging the behavior of CGI::Escape (a C ext added in Ruby 2.3) I discovered problems with the superclass logic surrounding prepended and extended modules.
Specifically, the following example will blow out the stack:
Small changes in order here will work properly, producing an error about "blah" not being available on Foo (for the super call).
For example, this works:
For the moment I will modify the order in which these operations happen in the
cgi
library to get the related tests passing. Specifically, these fail:test/ruby/cgi/test_cgi_util.rb
Any non-ascii passed to these new optimized methods will hit the problem.
I believe this affects JRuby 9.1.8.0.
The text was updated successfully, but these errors were encountered: