summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index a82799de4df..b1961233c0a 100644
--- a/struct.c
+++ b/struct.c
@@ -198,7 +198,7 @@ make_struct(name, members, klass)
rb_warn("redefining constant Struct::%s", cname);
rb_mod_remove_const(klass, ID2SYM(id));
}
- nstr = rb_define_class_under(klass, cname, klass);
+ nstr = rb_define_class_under(klass, rb_id2name(id), klass);
}
rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
rb_iv_set(nstr, "__members__", members);