summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--eval.c2
-rw-r--r--lib/mkmf.rb2
-rw-r--r--marshal.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a7bd7a397..611c033ffc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Mon Oct 6 09:19:54 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * marshal.c (w_object): should pass "weak" value to next level.
+ [ruby-dev:21496]
+
+ * eval.c (proc_alloc): should not use cached object if klass is
+ different. [ruby-talk:83685]
+
Sun Oct 5 23:27:09 2003 Tanaka Akira <akr@m17n.org>
* lib/pathname.rb: version information is added in document.
diff --git a/eval.c b/eval.c
index 7f2062ff11..6114efa7e0 100644
--- a/eval.c
+++ b/eval.c
@@ -6928,7 +6928,7 @@ proc_alloc(klass, proc)
rb_warn("tried to create Proc object without a block");
}
- if (!proc && ruby_block->block_obj) {
+ if (!proc && ruby_block->block_obj && CLASS_OF(ruby_block->block_obj) == klass) {
return ruby_block->block_obj;
}
block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 0ff6351d02..c002c8893e 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -934,7 +934,7 @@ static: $(STATIC_LIB)
end
end
ensure
- mfile.close
+ mfile.close if mfile
end
def init_mkmf(config = CONFIG)
diff --git a/marshal.c b/marshal.c
index 7e58f13bf0..c25212a711 100644
--- a/marshal.c
+++ b/marshal.c
@@ -439,7 +439,7 @@ w_object(obj, arg, limit, weak)
limit--;
c_arg.limit = limit;
c_arg.arg = arg;
- c_arg.weak = Qfalse;
+ c_arg.weak = weak;
if (ivtbl = rb_generic_ivar_table(obj)) {
w_byte(TYPE_IVAR, arg);