class DL::PtrData
Public Instance Methods
set_object(obj)
click to toggle source
# File lib/sqlite3/driver/dl/driver.rb, line 26 def set_object(obj) self[0] = [obj.object_id].pack("L") end
to_object()
click to toggle source
The inverse of the Kernel#to_ptr operation.
# File lib/sqlite3/driver/dl/driver.rb, line 20 def to_object n = to_s(4).unpack("L").first return nil if n < 1 ObjectSpace._id2ref(n) rescue self.to_s end