mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
2059d39e98
commit
7ba9ce8a7e
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Jun 11 23:16:00 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* object.c (sym_call): disallow to call private methods.
|
||||
|
||||
Sun Jun 11 09:56:41 2006 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.h (write): not need to define on bcc.
|
||||
|
|
8
object.c
8
object.c
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue