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

ruby-changes:61356

From: Nobuyoshi <ko1@a...>
Date: Sun, 24 May 2020 10:53:45 +0900 (JST)
Subject: [ruby-changes:61356] b10c9d2012 (master): [DOC] Added document for rb_check_symbol() [ci skip]

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

From b10c9d201222b144df7d63660d1c731af53c4ae2 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 24 May 2020 10:53:12 +0900
Subject: [DOC] Added document for rb_check_symbol() [ci skip]


diff --git a/symbol.c b/symbol.c
index a0aa4cc..185c6a8 100644
--- a/symbol.c
+++ b/symbol.c
@@ -957,6 +957,18 @@ rb_check_id(volatile VALUE *namep) https://github.com/ruby/ruby/blob/trunk/symbol.c#L957
     return lookup_str_id(name);
 }
 
+/**
+ * Returns Symbol for the given name if it is interned already, or
+ * nil.
+ *
+ * \param namep   the pointer to the name object
+ * \return        the Symbol for *namep
+ * \pre           the object referred by \p namep must be a Symbol or
+ *                a String, or possible to convert with to_str method.
+ * \post          the object referred by \p namep is a Symbol or a
+ *                String if non-nil value is returned, or is a String
+ *                if nil is returned.
+ */
 VALUE
 rb_check_symbol(volatile VALUE *namep)
 {
-- 
cgit v0.10.2


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

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