[前][次][番号順一覧][スレッド一覧]

ruby-changes:66591

From: Nobuyoshi <ko1@a...>
Date: Thu, 24 Jun 2021 21:57:39 +0900 (JST)
Subject: [ruby-changes:66591] 189f154786 (master): [DOC] fixed return value of ENV.clone [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=189f154786

From 189f154786fd6392633fefd50bd76e9bdb401b52 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 24 Jun 2021 21:53:59 +0900
Subject: [DOC] fixed return value of ENV.clone [ci skip]

---
 hash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hash.c b/hash.c
index ca80e7e..cf19cdb 100644
--- a/hash.c
+++ b/hash.c
@@ -6489,10 +6489,10 @@ env_update(VALUE env, VALUE hash) https://github.com/ruby/ruby/blob/trunk/hash.c#L6489
 
 /*
  * call-seq:
- *   ENV.clone(freeze: nil) -> copy of ENV
+ *   ENV.clone(freeze: nil) -> ENV
  *
- * Returns a clone of ENV, but warns because the ENV data is shared with the
- * clone.
+ * Returns ENV itself, and warns because ENV is a wrapper for the
+ * process-wide environment variables and a clone is useless.
  * If +freeze+ keyword is given and not +nil+ or +false+, raises ArgumentError.
  * If +freeze+ keyword is given and +true+, raises TypeError, as ENV storage
  * cannot be frozen.
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]