Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > dlライブラリ > DL::CPtrクラス > ==

instance method DL::CPtr#==

eql?(other) -> bool
self == other -> bool

ポインタの指すアドレスが同一かどうかを判定します。

例:

require 'dl'

s = 'abc'
cptr  = DL::CPtr[s]
cptr0 = DL::CPtr[s]
cptr1 = cptr + 1

p cptr == cptr1     #=> false
p cptr == cptr0     #=> true
class DL::CPtr