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/branches/v1_1r@287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1998-08-27 03:55:54 +00:00
parent 39ac1d7c22
commit 707a0a946d
25 changed files with 288 additions and 210 deletions

View file

@ -206,15 +206,14 @@ struct_s_def(argc, argv, klass)
int argc;
VALUE *argv;
{
struct RString *name;
struct RArray *rest;
VALUE name, rest;
int i;
VALUE st;
rb_scan_args(argc, argv, "1*", &name, &rest);
for (i=0; i<rest->len; i++) {
ID id = rb_to_id(rest->ptr[i]);
rest->ptr[i] = INT2FIX(id);
for (i=0; i<RARRAY(rest)->len; i++) {
ID id = rb_to_id(RARRAY(rest)->ptr[i]);
RARRAY(rest)->ptr[i] = INT2FIX(id);
}
st = make_struct(name, rest, klass);
obj_call_init(st);