* proc.c (rb_obj_define_method): reverted. [ruby-talk:266637]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
18c9e590c3
commit
7d4ee1d235
@ -1,3 +1,7 @@
|
|||||||
|
Thu Aug 30 14:06:50 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* proc.c (rb_obj_define_method): reverted. [ruby-talk:266637]
|
||||||
|
|
||||||
Thu Aug 30 13:49:25 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Aug 30 13:49:25 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/mkmf.rb: initialize $top_srcdir always. [ruby-dev:31682]
|
* lib/mkmf.rb: initialize $top_srcdir always. [ruby-dev:31682]
|
||||||
|
14
proc.c
14
proc.c
@ -1,6 +1,6 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|
||||||
proc.c - Proc, Bindng, Env
|
proc.c - Proc, Binding, Env
|
||||||
|
|
||||||
$Author$
|
$Author$
|
||||||
$Date$
|
$Date$
|
||||||
@ -148,7 +148,6 @@ binding_alloc(VALUE klass)
|
|||||||
rb_binding_t *bind;
|
rb_binding_t *bind;
|
||||||
obj = Data_Make_Struct(klass, rb_binding_t,
|
obj = Data_Make_Struct(klass, rb_binding_t,
|
||||||
binding_mark, binding_free, bind);
|
binding_mark, binding_free, bind);
|
||||||
MEMZERO(bind, rb_binding_t, 1);
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -972,6 +971,14 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
|
|||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VALUE
|
||||||
|
rb_obj_define_method(int argc, VALUE *argv, VALUE obj)
|
||||||
|
{
|
||||||
|
VALUE klass = rb_singleton_class(obj);
|
||||||
|
|
||||||
|
return rb_mod_define_method(argc, argv, klass);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MISSING: documentation
|
* MISSING: documentation
|
||||||
@ -1495,6 +1502,9 @@ Init_Proc(void)
|
|||||||
/* Module#*_method */
|
/* Module#*_method */
|
||||||
rb_define_method(rb_cModule, "instance_method", rb_mod_method, 1);
|
rb_define_method(rb_cModule, "instance_method", rb_mod_method, 1);
|
||||||
rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1);
|
rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1);
|
||||||
|
|
||||||
|
/* Kernel */
|
||||||
|
rb_define_method(rb_mKernel, "define_singleton_method", rb_obj_define_method, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user