diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-04-07 08:41:26 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-04-07 08:41:26 +0000 |
commit | 14b9d586fa1fabb695f06c5b9c1d0785207d77ef (patch) | |
tree | 7dbbcd3b404423b4148864ec8232c17da601bcf4 | |
parent | ba06b1a81f81e089849c7c877eba7b1d3618b126 (diff) |
1.1b9_07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | lib/delegate.rb | 3 | ||||
-rw-r--r-- | variable.c | 17 | ||||
-rw-r--r-- | version.h | 4 |
5 files changed, 32 insertions, 6 deletions
@@ -1,5 +1,7 @@ Tue Apr 7 01:16:45 1998 Yukihiro Matsumoto <matz@netlab.co.jp> + * experimental release 1.1b9_07. + * array.c (ary_cmp): compare each element using `<=>'. * hash.c (hash_each_with_index): yields [value, key] pair. @@ -16,11 +18,19 @@ Mon Apr 6 14:49:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp> * eval.c (thread_yield): must return evaluated value. +Fri Apr 3 13:07:29 1998 Yukihiro Matsumoto <matz@netlab.co.jp> + + * eval.c (thread_schedule): context switch bypassed on wrong + conditions. + + * variable.c (rb_name_class): set classname by id before String + class is initialized (1.0 behavior restored). + Fri Apr 3 11:25:45 1998 Yukihiro Matsumoto <matz@netlab.co.jp> * numeric.c (num2int): no implicit conversion from string. - * numeric.c (num2int): check that `to_i' returned Integer. + * numeric.c (num2int): check whether `to_i' returns an Integer. * numeric.c (num_zero_p): new method. @@ -5629,7 +5629,7 @@ thread_schedule() /* raise fatal error to main thread */ thread_deadlock(); } - if (next == curr_thread) { + if (next->status == THREAD_RUNNABLE && next == curr_thread) { return; } diff --git a/lib/delegate.rb b/lib/delegate.rb index 205d5e1fbd..a544773983 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -13,11 +13,12 @@ class Delegator def initialize(obj) - preserved = ["type", "id", "equal?", "__getobj__"] for t in self.type.ancestors preserved |= t.instance_methods break if t == Delegator end + preserved |= ::Kernel.instance_methods + preserved -= ["to_s", "nil?", "to_a", "hash", "dup", "==", "=~"] for method in obj.methods next if preserved.include? method eval "def self.#{method}(*args,&block); __getobj__.__send__(:#{method}, *args,&block); end" diff --git a/variable.c b/variable.c index 0827ebbec6..24e66a6b56 100644 --- a/variable.c +++ b/variable.c @@ -131,6 +131,16 @@ classname(klass) } path = rb_iv_get(klass, "__classpath__"); if (NIL_P(path)) { + ID classid = rb_intern("__classid__"); + + path = rb_ivar_get(klass, classid); + if (!NIL_P(path)) { + path = str_new2(rb_id2name(FIX2INT(path))); + rb_ivar_set(klass, classid, path); + st_delete(RCLASS(klass)->iv_tbl, &classid, 0); + } + } + if (NIL_P(path)) { path = find_class_path(klass); if (NIL_P(path)) { return 0; @@ -203,7 +213,12 @@ rb_name_class(klass, id) { extern VALUE cString; - rb_iv_set(klass, "__classpath__", str_new2(rb_id2name(id))); + if (cString) { + rb_iv_set(klass, "__classpath__", str_new2(rb_id2name(id))); + } + else { + rb_iv_set(klass, "__classid__", INT2FIX(id)); + } } static st_table *autoload_tbl = 0; @@ -1,2 +1,2 @@ -#define RUBY_VERSION "1.1b9_06" -#define VERSION_DATE "98/03/28" +#define RUBY_VERSION "1.1b9_07" +#define VERSION_DATE "98/04/07" |