In certain cases rbs prototype rb
defines the wrong type definition for Object Class
#1345
Milestone
rbs prototype rb
defines the wrong type definition for Object Class
#1345
The following outputs results that
rbs prototype rb
does not expect.This is true not only for
include
but also forextend
andprepend
.This is a problem because if
rbs prototype
accidentally defines anObject
type, there is no way around it even if you manually override the type.The
rbs prototype
will not know the inner workings ofActiveSupport.on_load
and will have difficulty resolving the root cause.For example, what if the behavior of the
rbs prototype
command is to ignore includes in method blocks (and extend, prepend...) in a method block (and extend, prepend...) should be ignored.(Careful decision making is required as this would be an incompatible change.)
Workaround
This problem can be avoided by specifying an
include
receiver.However, you need to manually define the type of include to ActiveRecord::Base.
The text was updated successfully, but these errors were encountered: