Logo Search packages:      
Sourcecode: jruby1.1 version File versions

RubyBoolean org::jruby::RubyObject::respond_to_p ( IRubyObject  mname,
IRubyObject  includePrivate 
) [inline, inherited]


respond_to?( aSymbol, includePriv=false ) -> true or false

Returns true if this object responds to the given method. Private methods are included in the search only if the optional second parameter evaluates to true.

true if this responds to the given method
!!! For some reason MRI shows the arity of respond_to? as -1, when it should be -2; that's why this is rest instead of required, optional = 1

Going back to splitting according to method arity. MRI is wrong about most of these anyway, and since we have arity splitting in both the compiler and the interpreter, the performance benefit is important for this method.

Definition at line 1230 of file RubyObject.java.

        String name = mname.asJavaString();
        return getRuntime().newBoolean(getMetaClass().isMethodBound(name, !includePrivate.isTrue()));

Generated by  Doxygen 1.6.0   Back to index