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

ruby-changes:61659

From: Jeremy <ko1@a...>
Date: Thu, 11 Jun 2020 02:54:02 +0900 (JST)
Subject: [ruby-changes:61659] 573e8d7736 (master): Change language used in instance_variable_set documentation [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=573e8d7736

From 573e8d7736c84149ae298f4a8ed532525b6645d0 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Wed, 10 Jun 2020 10:49:28 -0700
Subject: Change language used in instance_variable_set documentation [ci skip]

This uses less harsh language recommended by duerst.

Fixes [Misc #15265]
Fixes [Misc #15748]

diff --git a/object.c b/object.c
index b619f64..f24fee8 100644
--- a/object.c
+++ b/object.c
@@ -2957,9 +2957,9 @@ rb_obj_ivar_get(VALUE obj, VALUE iv) https://github.com/ruby/ruby/blob/trunk/object.c#L2957
  *     obj.instance_variable_set(string, obj)    -> obj
  *
  *  Sets the instance variable named by <i>symbol</i> to the given
- *  object, thereby frustrating the efforts of the class's
- *  author to attempt to provide proper encapsulation. The variable
- *  does not have to exist prior to this call.
+ *  object. This may circumvent the the encapsulation intended by
+ *  the author of the class, so it should be used with care.
+ *  The variable does not have to exist prior to this call.
  *  If the instance variable name is passed as a string, that string
  *  is converted to a symbol.
  *
-- 
cgit v0.10.2


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

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