summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--hash.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 73fd7f7a30..ed7fe6f6f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jun 1 17:26:24 2001 K.Kosako <kosako@sofnec.co.jp>
+
+ * hash.c (replace_i): ignore when key == Qundef.
+
Fri Jun 1 16:50:59 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (call_args2): confusion with list_append() and
diff --git a/hash.c b/hash.c
index 7a08b0d500..2d99df3ce0 100644
--- a/hash.c
+++ b/hash.c
@@ -510,7 +510,10 @@ static int
replace_i(key, val, hash)
VALUE key, val, hash;
{
- rb_hash_aset(hash, key, val);
+ if (key != Qundef) {
+ rb_hash_aset(hash, key, val);
+ }
+
return ST_CONTINUE;
}