ruby-changes:45348
From: kazu <ko1@a...>
Date: Wed, 25 Jan 2017 23:28:47 +0900 (JST)
Subject: [ruby-changes:45348] kazu:r57421 (trunk): [DOC] Add empty example to enum.all? and any?
kazu 2017-01-25 23:28:42 +0900 (Wed, 25 Jan 2017) New Revision: 57421 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57421 Log: [DOC] Add empty example to enum.all? and any? [ci skip] Modified files: trunk/enum.c Index: enum.c =================================================================== --- enum.c (revision 57420) +++ enum.c (revision 57421) @@ -1166,6 +1166,7 @@ DEFINE_ENUMFUNCS(all) https://github.com/ruby/ruby/blob/trunk/enum.c#L1166 * %w[ant bear cat].all? { |word| word.length >= 3 } #=> true * %w[ant bear cat].all? { |word| word.length >= 4 } #=> false * [nil, true, 99].all? #=> false + * [].all? #=> true * */ @@ -1200,6 +1201,7 @@ DEFINE_ENUMFUNCS(any) https://github.com/ruby/ruby/blob/trunk/enum.c#L1201 * %w[ant bear cat].any? { |word| word.length >= 3 } #=> true * %w[ant bear cat].any? { |word| word.length >= 4 } #=> true * [nil, true, 99].any? #=> true + * [].any? #=> false * */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/