DynamicMethod method = object.getMetaClass().searchMethod(methodName);
if (method.isUndefined()) {
// catch respond_to? and respond_to_missing? cases
if (object.callMethod(context, "respond_to?", arg0).isTrue()) {
return object.callMethod(context, methodName, IRubyObject.NULL_ARRAY, block);
}
RubyKernel.methodMissing(context, self, methodName, Visibility.PUBLIC, CallType.FUNCTIONAL, IRubyObject.NULL_ARRAY, block);
} else if (method.getVisibility().isPrivate()) {
RubyKernel.methodMissing(context, self, methodName, Visibility.PRIVATE, CallType.FUNCTIONAL, IRubyObject.NULL_ARRAY, block);