From d8f981b972aab02d1432abe1c9cadf0507945e77 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 15 Mar 2000 09:09:28 +0000 Subject: [PATCH] 2000-03-15 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ configure | 3 +-- configure.in | 3 +-- eval.c | 10 ---------- hash.c | 22 ++++++++-------------- 5 files changed, 17 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1df0b5e4b2..b8eba1b9ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ +Wed Mar 15 17:26:05 2000 Yukihiro Matsumoto + + * hash.c (rb_hash_s_create): unexpected recursive call removed. + this bug was found by Satoshi Nojo . + Wed Mar 15 13:12:39 2000 Yukihiro Matsumoto + * eval.c (Init_Thread): Thread.join removed finally. + * string.c (rb_str_chomp_bang): forgot to call rb_str_modify(). Mon Mar 13 16:12:13 2000 Yukihiro Matsumoto diff --git a/configure b/configure index 2e4c5af106..f39cb17be0 100644 --- a/configure +++ b/configure @@ -4941,10 +4941,9 @@ case "$target_os" in # the main point is the '-v' flag of 'cc'. case "`cc -v -I. -c main.c -o /tmp/main.o 2>&1`" in */gemc_cc*) # we have the new DEC GEM CC - CFLAGS="$CFLAGS -frpm d -ieee" + CFLAGS="$CFLAGS -oldc" ;; *) # we have the old MIPS CC - CFLAGS="$CFLAGS -oldc" ;; esac # cleanup diff --git a/configure.in b/configure.in index 611a80f5bf..54939679bc 100644 --- a/configure.in +++ b/configure.in @@ -782,10 +782,9 @@ case "$target_os" in # the main point is the '-v' flag of 'cc'. case "`cc -v -I. -c main.c -o /tmp/main.o 2>&1`" in */gemc_cc*) # we have the new DEC GEM CC - CFLAGS="$CFLAGS -frpm d -ieee" + CFLAGS="$CFLAGS -oldc" ;; *) # we have the old MIPS CC - CFLAGS="$CFLAGS -oldc" ;; esac # cleanup diff --git a/eval.c b/eval.c index 08e0509b08..60e08f86bd 100644 --- a/eval.c +++ b/eval.c @@ -6940,15 +6940,6 @@ rb_thread_join(thread) return thread; } -static VALUE -rb_thread_s_join(dmy, thread) /* will be removed in 1.4 */ - VALUE dmy; - VALUE thread; -{ - rb_warn("Thread::join is obsolete; use Thread#join instead"); - return rb_thread_join(thread); -} - VALUE rb_thread_current() { @@ -7810,7 +7801,6 @@ Init_Thread() rb_define_singleton_method(rb_cThread, "kill", rb_thread_s_kill, 1); rb_define_singleton_method(rb_cThread, "exit", rb_thread_exit, 0); rb_define_singleton_method(rb_cThread, "pass", rb_thread_pass, 0); - rb_define_singleton_method(rb_cThread, "join", rb_thread_s_join, 1); rb_define_singleton_method(rb_cThread, "current", rb_thread_current, 0); rb_define_singleton_method(rb_cThread, "main", rb_thread_main, 0); rb_define_singleton_method(rb_cThread, "list", rb_thread_list, 0); diff --git a/hash.c b/hash.c index 781857aa25..47681b2117 100644 --- a/hash.c +++ b/hash.c @@ -223,22 +223,16 @@ rb_hash_s_create(argc, argv, klass) VALUE hash; int i; - if (argc == 1) { - if (TYPE(argv[0]) == T_HASH) { - NEWOBJ(hash, struct RHash); - OBJSETUP(hash, klass, T_HASH); + if (argc == 1 && TYPE(argv[0]) == T_HASH) { + NEWOBJ(hash, struct RHash); + OBJSETUP(hash, klass, T_HASH); - hash->iter_lev = 0; - hash->ifnone = Qnil; - hash->tbl = 0; /* avoid GC crashing */ - hash->tbl = st_copy(RHASH(argv[0])->tbl); + hash->iter_lev = 0; + hash->ifnone = Qnil; + hash->tbl = 0; /* avoid GC crashing */ + hash->tbl = st_copy(RHASH(argv[0])->tbl); - return (VALUE)hash; - } - else { - VALUE a = rb_Array(argv[0]); - return rb_hash_s_create(RARRAY(a)->len, RARRAY(a)->ptr, klass); - } + return (VALUE)hash; } if (argc % 2 != 0) {