Skip to content

Commit

Permalink
version 1.0-971003
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
matz authored and k0kubun committed Aug 17, 2019
1 parent 10d2174 commit 7ad1988
Show file tree
Hide file tree
Showing 10 changed files with 370 additions and 19 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -1,5 +1,16 @@
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'.

Thu Oct 2 17:59:18 1997 Yukihiro Matsumoto <matz@netlab.co.jp>

* ext/marshal/marshal.c (r_object): remove temporal regist for
structs. (caused problem if structs form cycles.)

* version 1.0-971002

Wed Oct 1 14:01:49 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
Expand Down
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -48,6 +48,7 @@ re.c
re.h
regex.c
regex.h
ruby.1
ruby.c
ruby.h
sig.h
Expand Down
18 changes: 15 additions & 3 deletions eval.c
Expand Up @@ -675,13 +675,14 @@ ruby_options(argc, argv)

PUSH_TAG()
if ((state = EXEC_TAG()) == 0) {
NODE *save = eval_tree;
NODE *save;

Init_ext();
ext_init = 1;
ruby_process_options(argc, argv);
save = eval_tree;
rb_require_modules();
eval_tree = save;
ruby_process_options(argc, argv);
}
POP_TAG();
if (state) error_print();
Expand Down Expand Up @@ -3537,8 +3538,19 @@ void
rb_provide(feature)
char *feature;
{
if (!rb_provided(feature))
char *buf, *ext;

if (!rb_provided(feature)) {
ext = strrchr(feature, '.');
if (strcmp(DLEXT, ext) == 0) {
buf = ALLOCA_N(char, strlen(feature)+1);
strcpy(buf, feature);
ext = strrchr(buf, '.');
strcpy(ext, ".o");
feature = buf;
}
ary_push(rb_features, str_new2(feature));
}
}

VALUE
Expand Down
2 changes: 1 addition & 1 deletion ext/extmk.rb.in
Expand Up @@ -243,7 +243,7 @@ libdir = @libdir@/ruby/@arch@
mfile.printf $objs.join(" ")
mfile.printf "\n"

dots = if "@INSTALL@" =~ /^\// then "" else "#{$topdir}/" end
dots = if "@INSTALL@" =~ /^\// then "" else "#{$topdir}/ext" end
mfile.printf "\
TARGET = %s.%s
Expand Down
12 changes: 8 additions & 4 deletions ext/marshal/marshal.c
Expand Up @@ -620,7 +620,9 @@ r_object(arg)

case TYPE_FLOAT:
{
#ifndef atof
double atof();
#endif
char *buf;

r_bytes(buf, arg);
Expand Down Expand Up @@ -695,15 +697,17 @@ r_object(arg)
len = r_long(arg);

values = ary_new2(len);
i = 0;
for (i=0; i<len; i++) {
ary_push(values, Qnil);
}
v = struct_alloc(class, values);
r_regist(v, arg);
for (i=0; i<len; i++) {
ID slot = r_symbol(arg);
if (RARRAY(mem)->ptr[i] != INT2FIX(slot))
TypeError("struct not compatible");
ary_push(values, r_object(arg));
struct_aset(v, INT2FIX(i), r_object(arg));
}
v = struct_alloc(class, values);
st_insert(arg->data, num, v); /* re-regist */
return v;
}
break;
Expand Down

0 comments on commit 7ad1988

Please sign in to comment.