public class NativeProcMethod extends NativeMethod
NativeProcMethod
represents native functions that are wrapped in a RubyProc
object. They don't have scoping as normal Procs do and are no closures.DynamicMethod.NativeCall
arity, function
builtin, callConfig, handle, implementationClass, name, nativeCall, nativeCalls, notImplemented, protectedClass, serialNumber, visibility
Constructor and Description |
---|
NativeProcMethod(RubyModule clazz,
long function) |
Modifier and Type | Method and Description |
---|---|
IRubyObject |
call(ThreadContext context,
IRubyObject recv,
RubyModule clazz,
String name,
IRubyObject[] args)
A default implementation of n-arity, non-block 'call' method,
which simply calls the n-arity, block-receiving version with
the arg list and Block.NULL_BLOCK.
|
IRubyObject |
call(ThreadContext context,
IRubyObject recv,
RubyModule clazz,
String name,
IRubyObject[] args,
Block block)
The minimum 'call' method required for a dynamic method handle.
|
dup, getArity, isNative
calculateProtectedClass, call, call, call, call, call, call, call, call, getCallConfig, getHandle, getImplementationClass, getMethodData, getName, getNativeCall, getNativeCall, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, handleBreak, handleRedo, handleReturn, init, isBuiltin, isCallableFrom, isNotImplemented, isUndefined, setCallConfig, setHandle, setImplementationClass, setIsBuiltin, setName, setNativeCall, setNativeCall, setNativeCall, setNotImplemented, setVisibility
public NativeProcMethod(RubyModule clazz, long function)
public IRubyObject call(ThreadContext context, IRubyObject recv, RubyModule clazz, String name, IRubyObject[] args)
DynamicMethod
call
in class NativeMethod
context
- The thread context for the currently executing threadrecv
- The 'self' or 'receiver' object to use for this callname
- The incoming name used to invoke this methodpublic IRubyObject call(ThreadContext context, IRubyObject recv, RubyModule clazz, String name, IRubyObject[] args, Block block)
DynamicMethod
call
in class NativeMethod
context
- The thread context for the currently executing threadrecv
- The 'self' or 'receiver' object to use for this callname
- The incoming name used to invoke this methodargs
- The argument list to this invocationblock
- The block passed to this invocationCopyright © 2001-2014 JRuby. All Rights Reserved.