Implementing Interface in JRuby 1
Recently I decided to convert one of the tools I wrote in C# to JRuby. During the process I needed to implement a Java interface in JRuby. This sounds really weird to me because Ruby has no need for an interface because of the duck-typing system. The syntax for implementing an interface in JRuby is shown below:
class SomeClass
include javax.swing.tree.TreeCellEditor
# ...
endIn this case, SomeClass implements TreeCellEditor Java inteface. It uses mix-in like syntax. Prior to the 1.0 release, I believe it used ruby inheritance syntax instead of the current mix-in syntax. That would look even more weird because Ruby doesn't support multiple inheritance and it will be confusing when you are implemneting an interface and extending a class.
I don't know about you, but implementing an interface in Ruby still feels weird to me.

this did not work for me. i tried to implement java.lang.Throwable interface. dont know why... :(
buddhika