Skip to content

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

class method

Fiddle.dlwrap

Fiddle.dlwrap(val)

Returns a memory pointer of a function’s hexadecimal address location val

Example:

lib = Fiddle.dlopen('/lib64/libc-2.15.so')
=> #<Fiddle::Handle:0x00000001342460>

Fiddle.dlwrap(lib['strcpy'].to_s(16))
=> 25522520
See also .dlunwrap .free .dlopen .last_error also in 3.4 · 3.3 · 3.2 · 3.0