remove old warning
* marshal.c (r_object0): remove old warning for _alloc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eb6579e647
commit
f392a8aa9b
@ -1,3 +1,7 @@
|
|||||||
|
Mon Jun 4 06:12:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* marshal.c (r_object0): remove old warning for _alloc.
|
||||||
|
|
||||||
Mon Jun 4 04:24:06 2012 Tadayoshi Funaba <tadf@dotrb.org>
|
Mon Jun 4 04:24:06 2012 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
* marshal.c: experimental test aborted.
|
* marshal.c: experimental test aborted.
|
||||||
|
14
marshal.c
14
marshal.c
@ -1644,18 +1644,8 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
|
|||||||
case TYPE_DATA:
|
case TYPE_DATA:
|
||||||
{
|
{
|
||||||
VALUE klass = path2class(r_unique(arg));
|
VALUE klass = path2class(r_unique(arg));
|
||||||
if (rb_respond_to(klass, s_alloc)) {
|
|
||||||
static int warn = TRUE;
|
v = rb_obj_alloc(klass);
|
||||||
if (warn) {
|
|
||||||
rb_warn("define `allocate' instead of `_alloc'");
|
|
||||||
warn = FALSE;
|
|
||||||
}
|
|
||||||
v = rb_funcall(klass, s_alloc, 0);
|
|
||||||
check_load_arg(arg, s_alloc);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
v = rb_obj_alloc(klass);
|
|
||||||
}
|
|
||||||
if (!RB_TYPE_P(v, T_DATA)) {
|
if (!RB_TYPE_P(v, T_DATA)) {
|
||||||
rb_raise(rb_eArgError, "dump format error");
|
rb_raise(rb_eArgError, "dump format error");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user