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
Stackoverflow calling "super" from included module method #5272
Comments
@headius this looks super familiar right? Did we fix something with prepend or something on master that we did not cherry pick? |
That anonymous module right before |
@dr-itz thanks for pointing that out. cherry-picked and all looks well. Only travising hitting a test I did not run locally could re-open this now. |
Environment
Expected behavior
Calling
super
works in 9.1.x. It does in 9.2.0.0Actual behaviour
In jruby/activerecord-jdbc-adapter the SQLite3Adapter is structured as follows:
when
translate_exception
is called inActiveRecord::ConnectionAdapters::SQLite3Adapter
, the one from theArJdbc::SQLite3
module is called as expected. When this in turn calls super, it ends up calling itself which gives a StackOverflowError. It's supposed to call the implementation fromArJdbc::Abstract::Core
. Note: it's not limited to this methods, others are affected as well.The relevant stack traces (cleaned up a bit for readability):
Ruby side:
Java side:
Workaround
Moving the affected methods from the
ArJdbc::SQLite3
module to theActiveRecord::ConnectionAdapters::SQLite3Adapter
class,super
works as expected calling the implementation inArJdbc::Abstract::Core
.Reproducer
A reduced version of this runs fine. Also, in ARJDBC the PostgreSQL adapter is structured the same and works fine. When running the SQLite3 adater on 9.2.0.0 it runs fine as well. Reproducer for the full thing:
In activerecord-jdbc-adapter: prepare and build
Prepare env
Run one of the failing tests
The text was updated successfully, but these errors were encountered: