The current mod_declare used in declarations may conflict with
JRuby because it uses ObjectSpace (which JRuby disables by
default):
def mod_declare(klass, declaration, configs={}, &block)
options = {}
options[:arity] = arity(block) if block_given?
subclass = declare(klass, declaration, configs, options)
if block_given?
mod = Module.new
mod.module_eval %Q{
ACTION = ObjectSpace._id2ref(#{block.object_id})
def process(*args)
results = super
case ACTION.arity
when 0 then ACTION.call
when 1 then ACTION.call(self)
else ACTION.call(self, *args)
end
results
end
}
subclass.send(:include, mod)
end
subclass.instance
end
I haven't tested for a conflict, but this is another suggestion
that mod_declare is going about things in the wrong way.