Open n-rodriguez opened 1 month ago
Thank you for the report, we'll look into it.
It seems the issue is that methods of a module ActiveRecordPatch
(that is included into RuntimeRegistry
) aren't accessible as class methods. The RuntimeRegistry
module extend
s itself so instance methods become class methods as well. But it seems it doesn't work on TruffleRuby.
A simplified example:
module A
extend self
end
module B
def foo
:foo
end
end
A.include B
puts A.foo
It works on CRuby but raises exception on TruffleRuby:
undefined method `foo' for A:Module (NoMethodError)
Hi there!
I'm trying to run a Rails application with TruffleRuby 24.0.1 and it almost works expect one thing : a monkey patch is not applied to the codebase :/
The patch :
This monkey patch is extracted from this PR : https://github.com/rails/rails/pull/51457
The error is :
This works perfectly with Ruby 3.3.1.
Thank you!