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

ruby-changes:37422

From: shugo <ko1@a...>
Date: Thu, 5 Feb 2015 10:34:21 +0900 (JST)
Subject: [ruby-changes:37422] shugo:r49503 (trunk): * class.c (rb_obj_singleton_methods): should use RTEST() to convert

shugo	2015-02-05 10:34:01 +0900 (Thu, 05 Feb 2015)

  New Revision: 49503

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

  Log:
    * class.c (rb_obj_singleton_methods): should use RTEST() to convert
      VALUE to int.

  Modified files:
    trunk/ChangeLog
    trunk/class.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49502)
+++ ChangeLog	(revision 49503)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Feb  5 10:31:46 2015  Shugo Maeda  <shugo@r...>
+
+	* class.c (rb_obj_singleton_methods): should use RTEST() to convert
+	  VALUE to int.
+
 Thu Feb  5 03:59:33 2015  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* vm_insnhelper.c: Fix symbol leak with +send+ [Bug #10828]
Index: class.c
===================================================================
--- class.c	(revision 49502)
+++ class.c	(revision 49503)
@@ -1411,7 +1411,7 @@ rb_obj_singleton_methods(int argc, const https://github.com/ruby/ruby/blob/trunk/class.c#L1411
     klass = CLASS_OF(obj);
     origin = RCLASS_ORIGIN(klass);
     me_arg.list = st_init_numtable();
-    me_arg.recur = recur;
+    me_arg.recur = RTEST(recur);
     if (klass && FL_TEST(klass, FL_SINGLETON)) {
 	if ((mtbl = RCLASS_M_TBL(origin)) != 0)
 	    st_foreach(mtbl, method_entry_i, (st_data_t)&me_arg);

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

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