1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-07-06 07:21:26 +00:00
parent a60db057a2
commit d1375688cd
18 changed files with 389 additions and 149 deletions

View file

@ -235,7 +235,7 @@ rb_struct_s_def(argc, argv, klass)
id = rb_to_id(RARRAY(rest)->ptr[i]);
RARRAY(rest)->ptr[i] = ID2SYM(id);
}
if (TYPE(name) != T_STRING) {
if (!NIL_P(name) && TYPE(name) != T_STRING) {
id = rb_to_id(name);
rb_ary_unshift(rest, ID2SYM(id));
name = Qnil;