Skip to content

jruby can't use it's own java classes #1925

@guai

Description

@guai

jruby 1.7.13

require 'jruby'
JRuby.runtime.defineReadonlyVariable('$var', proxied_java_object, Java::org.jruby.internal.runtime.GlobalVariable::Scope::GLOBAL)

This does not work. JRuby always tries to unwrap proxied_java_object to the core object even when IRubyObject is needed by itself.
It seems ConcreteJavaProxy#toJava should also check this condition:

else if(type.isAssignableFrom(getClass())) {
            return this;
        }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions