diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | class.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Feb 5 10:31:46 2015 Shugo Maeda <shugo@ruby-lang.org> + + * 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@marc-andre.ca> * vm_insnhelper.c: Fix symbol leak with +send+ [Bug #10828] @@ -1411,7 +1411,7 @@ rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj) 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); |