зеркало из https://github.com/github/ruby.git
* object.c (sym_call): check if the receiver is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
319d2b185b
Коммит
2e61b69722
|
@ -1,3 +1,7 @@
|
|||
Fri Aug 25 16:05:50 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* object.c (sym_call): check if the receiver is given.
|
||||
|
||||
Wed Aug 23 00:25:14 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/rexml/source.rb (REXML::IOSource#initialize): encoding have to
|
||||
|
|
6
object.c
6
object.c
|
@ -1057,8 +1057,12 @@ sym_to_sym(VALUE sym)
|
|||
static VALUE
|
||||
sym_call(VALUE args, VALUE sym)
|
||||
{
|
||||
VALUE obj = RARRAY(args)->ptr[0];
|
||||
VALUE obj;
|
||||
|
||||
if (RARRAY(args)->len < 1) {
|
||||
rb_raise(rb_eArgError, "no receiver given");
|
||||
}
|
||||
obj = RARRAY(args)->ptr[0];
|
||||
return rb_funcall3(obj, (ID)sym,
|
||||
RARRAY(args)->len - 1,
|
||||
RARRAY(args)->ptr + 1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче