1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
shugo 2015-02-05 01:34:01 +00:00
parent 1fd6ab5bab
commit 9e57ac56a3
2 changed files with 6 additions and 1 deletions

View file

@ -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]

View file

@ -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);