summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-11 14:16:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-11 14:16:27 +0000
commitb6e8e4507d15154a7b078a7f67ca2f2ac8454202 (patch)
tree50e85364875acf2d18fdfbd5fbf0346cd574619f
parent0bad73df413bc53164287d28690d04595952df81 (diff)
downloadruby-b6e8e4507d15154a7b078a7f67ca2f2ac8454202.tar.gz
ruby-b6e8e4507d15154a7b078a7f67ca2f2ac8454202.tar.xz
ruby-b6e8e4507d15154a7b078a7f67ca2f2ac8454202.zip
* object.c (sym_call): disallow to call private methods.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--object.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a5326bec..a0d784977 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/object.c b/object.c
index f1d87c022..49957c7bc 100644
--- a/object.c
+++ b/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));
}