Sha256: 312d2ec69ec4cd3cd7bc836c581b246c97cf8c14c9028342220f9d4087f7a11e
Contents?: true
Size: 580 Bytes
Versions: 5
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true module MTLibuv module Resource def resolve(deferred, rc) if rc && rc < 0 deferred.reject(@reactor.lookup_error(rc)) else deferred.resolve(nil) end end def check_result!(rc) e = @reactor.lookup_error(rc) unless rc.nil? || rc >= 0 raise e if e end def check_result(rc) @reactor.lookup_error(rc) unless rc.nil? || rc >= 0 end def to_ptr @pointer end end end
Version data entries
5 entries across 5 versions & 1 rubygems