tags:

views:

35

answers:

1

I still don't feel like this is adequately answered. how does one do this in jruby:

MyClass myobj = new MyClass;
InheritsFromMyClass changedobj = (InheritsFromMyClass)myobj;
+1  A: 

Since Ruby is a dynamically typed language you do not need to cast the type:

myobj = MyClass.new
changedobj = myobj
Andreas Schlapsi
what happens when `changedobj.method_that_is_only_on_inherits_from_my_class`
quinn
i think this question is stemming from my complete lack of java knowledge. It works, thank you
quinn