diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-11 14:16:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-11 14:16:27 +0000 |
commit | 7ba9ce8a7ee8eac00d8e7319b658eda765730d8b (patch) | |
tree | 50e85364875acf2d18fdfbd5fbf0346cd574619f /object.c | |
parent | 2059d39e981a884a7c03a933ababca2835773c1c (diff) |
* object.c (sym_call): disallow to call private methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1060,9 +1060,9 @@ sym_call(VALUE args, VALUE sym) { VALUE obj = RARRAY(args)->ptr[0]; - return rb_funcall(obj, SYM2ID(sym), - RARRAY(args)->len - 1, - RARRAY(args)->ptr + 1); + return rb_funcall3(obj, (ID)sym, + RARRAY(args)->len - 1, + RARRAY(args)->ptr + 1); } /* @@ -1077,7 +1077,7 @@ sym_call(VALUE args, VALUE sym) static VALUE sym_to_proc(VALUE sym) { - return rb_proc_new(sym_call, sym); + return rb_proc_new(sym_call, (VALUE)SYM2ID(sym)); } |