|
Renaming. Ruby implementations should (if possible) not need to call super() when they define an initialize. It is a frequent source of confusion. I have no suggestions at the moment on how this should be fixed. My patch to fix this issue.... Committed in 2669. This has a minor tweak from attached patch in bug to allow arbitrary number of arguments in initialize. |
||||||||||||||||||||||||||||||||||||||||||||||
This is a known issue when implementing an interface in Ruby and providing an initalizer for that implementation. In order to allow the JRuby-provided proxy code to initialize properly, Ruby-based implementations of Java interfaces should call super with no arguments. I do not like this requirement and I will modify this bug to point specifically toward fixing it.
At any rate, as a workaround replace:
class NSCT1 < NamespaceContext def initialize foo # doesn't need to do anything end ...with:
class NSCT1 < NamespaceContext def initialize foo super() # doesn't need to do anything end ...