Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Fiddle::Function.new

new(ptr,
args,
ret_type,
abi = DEFAULT,
name: nil,
need_gvl: false)

Constructs a Function object.

  • ptr is a referenced function, of a Fiddle::Handle

  • args is an Array of arguments, passed to the ptr function

  • ret_type is the return type of the function

  • abi is the ABI of the function

  • name is the name of the function

  • need_gvl is whether GVL is needed to call the function

See also #call #need_gvl? also in 3.4 · 3.3 · 3.1 · 3.0