mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* struct.c (make_struct): needs meta class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e29f59f989
commit
693746fba0
2 changed files with 5 additions and 0 deletions
1
struct.c
1
struct.c
|
|
@ -165,6 +165,7 @@ make_struct(name, member, klass)
|
|||
|
||||
if (NIL_P(name)) {
|
||||
nstr = rb_class_new(klass);
|
||||
rb_make_metaclass(nstr, RBASIC(klass)->klass);
|
||||
rb_class_inherited(klass, nstr);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue