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

ruby-changes:49064

From: kazu <ko1@a...>
Date: Wed, 13 Dec 2017 00:17:06 +0900 (JST)
Subject: [ruby-changes:49064] kazu:r61179 (trunk): Add more example of `Enumerable#one?` [ci skip]

kazu	2017-12-13 00:01:13 +0900 (Wed, 13 Dec 2017)

  New Revision: 61179

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

  Log:
    Add more example of `Enumerable#one?` [ci skip]

  Modified files:
    trunk/enum.c
Index: enum.c
===================================================================
--- enum.c	(revision 61178)
+++ enum.c	(revision 61179)
@@ -1515,6 +1515,7 @@ rb_nmin_run(VALUE obj, VALUE num, int by https://github.com/ruby/ruby/blob/trunk/enum.c#L1515
  *     [ nil, true, 99 ].one?                             #=> false
  *     [ nil, true, false ].one?                          #=> true
  *     [ nil, true, 99 ].one?(Integer)                    #=> true
+ *     [].one?                                            #=> false
  *
  */
 static VALUE

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

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