1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* struct.c (rb_struct_s_members): should raise TypeError instead

of call rb_bug().  [ruby-dev:31709]

* marshal.c (r_object0): no nil check require any more.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-09-07 17:47:56 +00:00
parent eda22a3411
commit 531eab2cdc
3 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,10 @@
Sat Sep 8 02:45:33 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* struct.c (rb_struct_s_members): should raise TypeError instead
of call rb_bug(). [ruby-dev:31709]
* marshal.c (r_object0): no nil check require any more.
Sat Sep 8 01:46:36 2007 NAKAMURA Usaku <usa@ruby-lang.org>
* regenc.c, regenc.h (onigenc_single_byte_mbc_enc_len): should take

View file

@ -1148,9 +1148,6 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
klass = path2class(r_unique(arg));
mem = rb_struct_s_members(klass);
if (mem == Qnil) {
rb_raise(rb_eTypeError, "uninitialized struct");
}
len = r_long(arg);
values = rb_ary_new2(len);

View file

@ -37,7 +37,7 @@ rb_struct_s_members(VALUE klass)
VALUE members = rb_struct_iv_get(klass, "__members__");
if (NIL_P(members)) {
rb_bug("non-initialized struct");
rb_raise(rb_eTypeError, "uninitialized struct");
}
return members;
}