Skip to content

Commit 7ad1988

Browse files
matzk0kubun
authored andcommitted
version 1.0-971003
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-971003.tar.gz Fri Oct 3 10:51:10 1997 Yukihiro Matsumoto <matz@netlab.co.jp> * version 1.0-971003 * eval.c (ruby_options): f_require() called too early. * eval.c (rb_provide): module extentions should always be `.o'.
1 parent 10d2174 commit 7ad1988

File tree

10 files changed

+370
-19
lines changed

10 files changed

+370
-19
lines changed

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
Fri Oct 3 10:51:10 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
2+
3+
* version 1.0-971003
4+
5+
* eval.c (ruby_options): f_require() called too early.
6+
7+
* eval.c (rb_provide): module extentions should always be `.o'.
8+
19
Thu Oct 2 17:59:18 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
210

11+
* ext/marshal/marshal.c (r_object): remove temporal regist for
12+
structs. (caused problem if structs form cycles.)
13+
314
* version 1.0-971002
415

516
Wed Oct 1 14:01:49 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ re.c
4848
re.h
4949
regex.c
5050
regex.h
51+
ruby.1
5152
ruby.c
5253
ruby.h
5354
sig.h

eval.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,13 +675,14 @@ ruby_options(argc, argv)
675675

676676
PUSH_TAG()
677677
if ((state = EXEC_TAG()) == 0) {
678-
NODE *save = eval_tree;
678+
NODE *save;
679679

680680
Init_ext();
681681
ext_init = 1;
682+
ruby_process_options(argc, argv);
683+
save = eval_tree;
682684
rb_require_modules();
683685
eval_tree = save;
684-
ruby_process_options(argc, argv);
685686
}
686687
POP_TAG();
687688
if (state) error_print();
@@ -3537,8 +3538,19 @@ void
35373538
rb_provide(feature)
35383539
char *feature;
35393540
{
3540-
if (!rb_provided(feature))
3541+
char *buf, *ext;
3542+
3543+
if (!rb_provided(feature)) {
3544+
ext = strrchr(feature, '.');
3545+
if (strcmp(DLEXT, ext) == 0) {
3546+
buf = ALLOCA_N(char, strlen(feature)+1);
3547+
strcpy(buf, feature);
3548+
ext = strrchr(buf, '.');
3549+
strcpy(ext, ".o");
3550+
feature = buf;
3551+
}
35413552
ary_push(rb_features, str_new2(feature));
3553+
}
35423554
}
35433555

35443556
VALUE

ext/extmk.rb.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ libdir = @libdir@/ruby/@arch@
243243
mfile.printf $objs.join(" ")
244244
mfile.printf "\n"
245245

246-
dots = if "@INSTALL@" =~ /^\// then "" else "#{$topdir}/" end
246+
dots = if "@INSTALL@" =~ /^\// then "" else "#{$topdir}/ext" end
247247
mfile.printf "\
248248
TARGET = %s.%s
249249

ext/marshal/marshal.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ r_object(arg)
620620

621621
case TYPE_FLOAT:
622622
{
623+
#ifndef atof
623624
double atof();
625+
#endif
624626
char *buf;
625627

626628
r_bytes(buf, arg);
@@ -695,15 +697,17 @@ r_object(arg)
695697
len = r_long(arg);
696698

697699
values = ary_new2(len);
698-
i = 0;
700+
for (i=0; i<len; i++) {
701+
ary_push(values, Qnil);
702+
}
703+
v = struct_alloc(class, values);
704+
r_regist(v, arg);
699705
for (i=0; i<len; i++) {
700706
ID slot = r_symbol(arg);
701707
if (RARRAY(mem)->ptr[i] != INT2FIX(slot))
702708
TypeError("struct not compatible");
703-
ary_push(values, r_object(arg));
709+
struct_aset(v, INT2FIX(i), r_object(arg));
704710
}
705-
v = struct_alloc(class, values);
706-
st_insert(arg->data, num, v); /* re-regist */
707711
return v;
708712
}
709713
break;

0 commit comments

Comments
 (0)