mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a60db057a2
commit
d1375688cd
18 changed files with 389 additions and 149 deletions
2
struct.c
2
struct.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue