Guest User

Untitled

a guest
Apr 26th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. ~/projects/jruby ➔ jruby -J-Djruby.ji.newStyleExtension=true impl.rb
  2. class Foo_2071503186
  3. class org.jruby.RubyObject
  4. class Foo2_2071503278
  5. class java.lang.Object
  6.  
  7. ~/projects/jruby ➔ cat impl.rb
  8. require 'java'
  9. require 'jruby'
  10.  
  11. class Foo
  12. include java.lang.Runnable
  13. end
  14.  
  15. f = Foo.new
  16.  
  17. # inspect the object from the Java side of the world
  18. ref = JRuby.reference(f)
  19. puts ref.getClass
  20. puts ref.getClass.getSuperclass
  21.  
  22. class Foo2 < java.lang.Object
  23. include java.lang.Runnable
  24. end
  25.  
  26. f2 = Foo2.new
  27.  
  28. # inspect again
  29. ref = JRuby.reference(f2)
  30. puts ref.getClass
  31. puts ref.getClass.getSuperclass
Add Comment
Please, Sign In to add comment