Yeah, java_kind_of?, which was sort of an interim solution until we could correctly reflect the Java class hierarchy in Ruby, will work because underneath it calls java.lang.Class.isAssignableFrom().
The problem is that normal Ruby class membership operations, which now work with other types of Java class/object, don't work with arrays:
>> java.lang.String < java.lang.Object
=> true
>> java.lang.String[] < java.lang.Object
=> nil
>> java.lang.String[10].new.kind_of?java.lang.Object
=> false
This turns out to be a slightly tricky problem to resolve. Here's what the inheritance looks like right now.
Non-array class:
>> java.lang.String.ancestors
=> [Java::JavaLang::String, Java::JavaIo::Serializable, Java::JavaLang::Comparable, Comparable, Java
::JavaLang::CharSequence, Java::JavaLang::Object, ConcreteJavaProxy, JavaProxy, JavaProxyMethods,
Object, Kernel]
Array class:
>> java.lang.String[].ancestors
=> [#<Class:01xe7e8eb>, ArrayJavaProxy, Enumerable, JavaProxy, JavaProxyMethods, Object, Kernel]
I'll probably change ArrayJavaProxy (which contains the Ruby side of Java/Ruby array functionality) into a module, and include it into array classes, but have them descend from ConcreteJavaProxy, which is the immediate parent of the Rubified Java class hierarchy. I'll take a crack at it this weekend, but I'm leery of trying to sneak this in before 1.0. I haven't heard a complaint about it from anyone besides me...
Very much looking forward to revamping all this post-1.0. The proxy layer must go...
Bill: will time permit this week?