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.dlunwrap

Fiddle.dlunwrap(addr)

Returns the hexadecimal representation of a memory pointer address addr

Example:

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

lib['strcpy'].to_s(16)
=> "7f59de6dd240"

Fiddle.dlunwrap(Fiddle.dlwrap(lib['strcpy'].to_s(16)))
=> "7f59de6dd240"
See also .dlopen .dlwrap .free also in 3.4 · 3.3 · 3.1 · 3.0