summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-05 01:34:01 (GMT)
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-05 01:34:01 (GMT)
commit9e57ac56a38be03ed197dc63019626eb465c8e38 (patch)
treed3f19adc22f3a6d3a4e001071f0ef743126d0504 /class.c
parent1fd6ab5bab06305e70a167be2c7bc8900f58cbf6 (diff)
* class.c (rb_obj_singleton_methods): should use RTEST() to convert
VALUE to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class.c b/class.c
index c5d7ee2..720df68 100644
--- a/class.c
+++ b/class.c
@@ -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);