Nested includes with a Module.included in between spread over multiple files throws a NoMethodError. This is on the latest 9.0.0.0 SNAPSHOT installed with ruby-build.
$ ruby ./a.rb
NoMethodError: undefined method `include' for A:Class
method_missing at org/jruby/RubyBasicObject.java:1600
included at /home/toby/jruby-bug/b.rb:6
include at org/jruby/RubyModule.java:2220
A_0_1 at ./a.rb:7
__script__ at ./a.rb:6
However, if the modules in file b.rb are defined in the same file a.rb everything works fine. Both ways work in MRI.
The text was updated successfully, but these errors were encountered:
Nested includes with a
Module.included
in between spread over multiple files throws aNoMethodError
. This is on the latest 9.0.0.0 SNAPSHOT installed with ruby-build.Example:
File
a.rb
:File
b.rb
:Output:
However, if the modules in file
b.rb
are defined in the same filea.rb
everything works fine. Both ways work in MRI.The text was updated successfully, but these errors were encountered: