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

ruby-changes:62512

From: Alan <ko1@a...>
Date: Mon, 3 Aug 2020 01:58:20 +0900 (JST)
Subject: [ruby-changes:62512] c987be2552 (master): Improve docs for Module#remove_class_variable [ci skip]

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

From c987be2552d69eca3da7980e5edb3c11eced4b2f Mon Sep 17 00:00:00 2001
From: Alan Wu <alanwu@r...>
Date: Sun, 2 Aug 2020 12:56:06 -0400
Subject: Improve docs for Module#remove_class_variable [ci skip]


diff --git a/variable.c b/variable.c
index fe55cc9..5634082 100644
--- a/variable.c
+++ b/variable.c
@@ -3328,13 +3328,12 @@ rb_mod_class_variables(int argc, const VALUE *argv, VALUE mod) https://github.com/ruby/ruby/blob/trunk/variable.c#L3328
  *  call-seq:
  *     remove_class_variable(sym)    -> obj
  *
- *  Removes the definition of the <i>sym</i>, returning that
- *  constant's value.
+ *  Removes the named class variable from the receiver, returning that
+ *  variable's value.
  *
- *     class Dummy
+ *     class Example
  *       @@var = 99
- *       puts @@var
- *       remove_class_variable(:@@var)
+ *       puts remove_class_variable(:@@var)
  *       p(defined? @@var)
  *     end
  *
-- 
cgit v0.10.2


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

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