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:
parent
eda22a3411
commit
531eab2cdc
3 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
2
struct.c
2
struct.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue