summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--eval.c2
-rw-r--r--lib/delegate.rb3
-rw-r--r--variable.c17
-rw-r--r--version.h4
5 files changed, 32 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3de9e4c600..055e3d9004 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/eval.c b/eval.c
index 1d90375279..091e2ef7fa 100644
--- a/eval.c
+++ b/eval.c
@@ -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;
diff --git a/version.h b/version.h
index 2bb361a370..7217a03e5f 100644
--- a/version.h
+++ b/version.h
@@ -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"