From 3d40f115649ab40593d35616b6133b741a854dcb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 18 Dec 2023 13:55:15 +0900 Subject: [PATCH] [ruby/tempfile] [DOC] Missing documents https://github.com/ruby/tempfile/commit/6932d6bc6f --- lib/tempfile.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/tempfile.rb b/lib/tempfile.rb index cf6085192b..1d7b80a74d 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -88,6 +88,7 @@ require 'tmpdir' # mutex. class Tempfile < DelegateClass(File) + # The version VERSION = "0.2.1" # Creates a file in the underlying file system; @@ -165,19 +166,19 @@ class Tempfile < DelegateClass(File) 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