Closed palkan closed 3 months ago
I wonder if we use method_defined?(:with, false)?
How would this help?
Removing bug
label because this is ActiveSupport bullsh*t causing issues again.
How would this help?
This way, we will only check if the #with
is defined in this class, not its ancestors:
class Object
def with; end
end
class A
end
A.method_defined?(:with) #=> true
A.method_defined?(:with, false) #=> false
That's just a guess that this could be the solution; I don't have a full content on why this check has been added in the first place.
Seems like a good enough workaround to me
Oops, the snippet in the previous message was incorrect. Fixed.
Describe the bug
Loading
rom-sql
with Rails 7.1 (main) fails due to the recently addedObject#with
monkey-patch (yeah, it strikes again):Looks like this line is the reason: https://github.com/rom-rb/rom/blob/7fb82cf7ffa86805d9c5499a4ecc64d5d3c20f14/lib/rom/initializer.rb#L19 (that's why I open issue here, not in
rom-sql
).I wonder if we use
method_defined?(:with, false)
?To Reproduce
Load a Rails app, using Rails from
main
and addrom
androm-sql
.