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

ruby-changes:40511

From: knu <ko1@a...>
Date: Mon, 16 Nov 2015 16:41:32 +0900 (JST)
Subject: [ruby-changes:40511] knu:r52592 (trunk): Explain the reason for calling do_with_enum without a block [ci skip]

knu	2015-11-16 16:41:18 +0900 (Mon, 16 Nov 2015)

  New Revision: 52592

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

  Log:
    Explain the reason for calling do_with_enum without a block [ci skip]

  Modified files:
    trunk/lib/set.rb
Index: lib/set.rb
===================================================================
--- lib/set.rb	(revision 52591)
+++ lib/set.rb	(revision 52592)
@@ -151,7 +151,7 @@ class Set https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L151
       @hash.replace(enum.instance_variable_get(:@hash))
       self
     else
-      do_with_enum(enum)
+      do_with_enum(enum)  # make sure enum is enumerable before calling clear
       clear
       merge(enum)
     end

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

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