summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--enum.c1
-rw-r--r--test/ruby/test_enum.rb1
3 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 62f4ad5..1699f64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul 1 10:54:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * Add test for Enumerable#none? [fix GH-950] Patch by @yui-knk
+
Wed Jul 1 09:30:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* struct.c (struct_set_members): hide internal back_members
diff --git a/enum.c b/enum.c
index e14ebfa..db17c04 100644
--- a/enum.c
+++ b/enum.c
@@ -1401,6 +1401,7 @@ DEFINE_ENUMFUNCS(none)
* [].none? #=> true
* [nil].none? #=> true
* [nil, false].none? #=> true
+ * [nil, false, true].none? #=> false
*/
static VALUE
enum_none(VALUE obj)
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb
index 9260c43..a599fab 100644
--- a/test/ruby/test_enum.rb
+++ b/test/ruby/test_enum.rb
@@ -265,6 +265,7 @@ class TestEnumerable < Test::Unit::TestCase
assert([].none?)
assert([nil].none?)
assert([nil,false].none?)
+ assert(![nil,false,true].none?)
end
def test_min