diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-06 07:21:26 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-06 07:21:26 +0000 |
commit | d1375688cdde3d094984f7f3a7bffe57306a0bca (patch) | |
tree | f5320945b9bfd9fc19b133335a7be45076fe03e9 /struct.c | |
parent | a60db057a2a8456f8f5b59a6c5805e25d1d47d34 (diff) |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |