From 4e65eab7abf53838579600e3dcc99a43012c45c2 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Mon, 3 Apr 1995 15:19:41 +0900 Subject: version 0.71 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.71.tar.gz Mon Apr 3 15:19:41 1995 Yukihiro Matsumoto (matz@ix-02) * regexp.c(re_match): バグがあった.match_2を削除した時にenbugして いたのだった. Mon Mar 27 15:41:43 1995 Yukihiro Matsumoto (matz@ix-02) * dict.c: Dict->Hashに全面的に移行. Thu Mar 23 20:30:00 1995 Yukihiro Matsumoto (matz@ix-02) * dbm.c,socket.c: extディレクトリに分離. * configure: dln周りのチェックの強化 * dln.c: initの呼び出しをdlopen()版に合わせた. Mon Mar 20 17:45:08 1995 Yukihiro Matsumoto (matz@ix-02) * configure: autoconf 2.2に対応(一部). Fri Mar 17 15:56:44 1995 Yukihiro Matsumoto (matz@ix-02) * dln.c: dlopenのあるマシンではそちらを使うように.ただし,ちゃん と動いているかどうかは自信がない. * regex.c: virtual concatinationをやめた. Thu Mar 16 11:32:57 1995 Yukihiro Matsumoto (matz@ix-02) * version 0.70 * eval.c,regex.c: gccでのコンパイルエラー. * io.c: inplace-editで拡張子が指定されない場合,もとのファイルを削 除する. --- eval.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 58a8354864..ed3860a2ee 100644 --- a/eval.c +++ b/eval.c @@ -18,6 +18,19 @@ #include #include #include "st.h" +#include "dln.h" + +#ifdef HAVE_STRING_H +# include +#else +char *strchr(); +#endif + +#ifdef HAVE_STDLIB_H +#include +#else +char *getenv(); +#endif static void rb_clear_cache_body(); static void rb_clear_cache_entry(); @@ -1113,7 +1126,7 @@ rb_eval(node) case NODE_HASH: { NODE *list; - VALUE hash = dic_new(); + VALUE hash = hash_new(); VALUE key, val; list = node->nd_head; @@ -1121,10 +1134,10 @@ rb_eval(node) key = rb_eval(list->nd_head); list = list->nd_next; if (list == Qnil) - Bug("odd number list for Dict"); + Bug("odd number list for Hash"); val = rb_eval(list->nd_head); list = list->nd_next; - Fdic_aset(hash, key, val); + Fhash_aset(hash, key, val); } return hash; } @@ -1266,7 +1279,7 @@ rb_eval(node) while (TYPE(tmp) == T_ICLASS) { tmp = RCLASS(tmp)->super; } - if (tmp != super) + if (tmp != RCLASS(super)) Fail("%s's superclass differs", rb_id2name(node->nd_cname)); } @@ -2220,13 +2233,16 @@ Fload(obj, fname) Check_Type(fname, T_STRING); file = find_file(fname->ptr); -#ifdef USE_DLN +#ifdef USE_DL { static int rb_dln_init = 0; extern char *rb_dln_argv0; int len = strlen(file); - if (len > 2 && file[len-1] == 'o' && file[len-2] == '.') { + if (len > 3 + && file[len-1] == 'o' && file[len-2] == '.' + || len > 4 + && file[len-1] == 'o' && file[len-2] == 's' && file[len-3] == '.'){ if (rb_dln_init == 0 && dln_init(rb_dln_argv0) == -1) { Fail("%s: %s", rb_dln_argv0, dln_strerror()); } @@ -2288,9 +2304,6 @@ Frequire(obj, fname) return TRUE; } -char *getenv(); -char *strchr(); - #ifndef RUBY_LIB #define RUBY_LIB "/usr/local/lib/ruby:." #endif -- cgit v1.2.3