Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:257634
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
~/projects/jruby ➔ jruby -J-Djruby.ji.newStyleExtension=true impl.rb
class Foo_2071503186
class org.jruby.RubyObject
class Foo2_2071503278
class java.lang.Object
 
~/projects/jruby ➔ cat impl.rb
require 'java'
require 'jruby'
 
class Foo
include java.lang.Runnable
end
 
f = Foo.new
 
# inspect the object from the Java side of the world
ref = JRuby.reference(f)
puts ref.getClass
puts ref.getClass.getSuperclass
 
class Foo2 < java.lang.Object
include java.lang.Runnable
end
 
f2 = Foo2.new
 
# inspect again
ref = JRuby.reference(f2)
puts ref.getClass
puts ref.getClass.getSuperclass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.