Open logicminds opened 7 years ago
try ruby -I lib:test test/pluginator/autodetect_test.rb
https://github.com/rvm/pluginator/blob/master/lib/pluginator/autodetect.rb#L24
What is the purpose of doing this as I think it is causing the error above.
For me it fixed the same problem... I do not see Autodetect
being defined anywhere earlier, does it also happen on master?
to show what problem I'm solving with it I put up this example test.rb
:
test.rb
class A ; end
# Example 1 - how it's written now, first definition, then used as namespace
class B < A ; end
class B
class C ; end
end
# Example 2 - what happens if we require first, then define class
class D
class E; end
end
class D < A ; end
Running it yields this:
# ruby test.rb
test.rb:13:in `<main>': superclass mismatch for class D (TypeError)
It is necessary to define the class with inheritance before we can use it as namespace, especially if we want to use it in other file.
I can't seem to run these tests locally. Am I missing something?