Skip to content

Commit

Permalink
[ruby/tempfile] [DOC] Missing documents
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and hsbt committed Dec 25, 2023
1 parent edadd5b commit 3d40f11
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/tempfile.rb
Expand Up @@ -88,6 +88,7 @@
# mutex.
class Tempfile < DelegateClass(File)

# The version
VERSION = "0.2.1"

# Creates a file in the underlying file system;
Expand Down Expand Up @@ -165,19 +166,19 @@ def initialize(basename="", tmpdir=nil, mode: 0, **options)
super(tmpfile)
end

def initialize_dup(other)
def initialize_dup(other) # :nodoc:
initialize_copy_iv(other)
super(other)
ObjectSpace.define_finalizer(self, Closer.new(__getobj__))
end

def initialize_clone(other)
def initialize_clone(other) # :nodoc:
initialize_copy_iv(other)
super(other)
ObjectSpace.define_finalizer(self, Closer.new(__getobj__))
end

private def initialize_copy_iv(other)
private def initialize_copy_iv(other) # :nodoc:
@unlinked = other.unlinked
@mode = other.mode
@opts = other.opts
Expand Down

0 comments on commit 3d40f11

Please sign in to comment.