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

ruby-changes:49220

From: nobu <ko1@a...>
Date: Tue, 19 Dec 2017 13:57:26 +0900 (JST)
Subject: [ruby-changes:49220] nobu:r61335 (trunk): error.c: KeyError docs [ci skip]

nobu	2017-12-19 13:57:20 +0900 (Tue, 19 Dec 2017)

  New Revision: 61335

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61335

  Log:
    error.c: KeyError docs [ci skip]
    
    * error.c (key_err_receiver, key_err_key): [DOC] documents of
      KeyError methods.

  Modified files:
    trunk/error.c
Index: error.c
===================================================================
--- error.c	(revision 61334)
+++ error.c	(revision 61335)
@@ -1610,6 +1610,13 @@ rb_invalid_str(const char *str, const ch https://github.com/ruby/ruby/blob/trunk/error.c#L1610
     rb_raise(rb_eArgError, "invalid value for %s: %+"PRIsVALUE, type, s);
 }
 
+/*
+ * call-seq:
+ *   key_error.receiver  -> object
+ *
+ * Return the receiver associated with this KeyError exception.
+ */
+
 static VALUE
 key_err_receiver(VALUE self)
 {
@@ -1620,6 +1627,13 @@ key_err_receiver(VALUE self) https://github.com/ruby/ruby/blob/trunk/error.c#L1627
     rb_raise(rb_eArgError, "no receiver is available");
 }
 
+/*
+ * call-seq:
+ *   key_error.key  -> object
+ *
+ * Return the key caused this KeyError exception.
+ */
+
 static VALUE
 key_err_key(VALUE self)
 {

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

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