summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-01 09:38:30 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-01 09:38:30 +0000
commit7670800476ee0bc0526cb4fe42dcc29080bb7b6f (patch)
treea05fb2a18ab1ee956fce60179209c5088a70d672
parente2688b5630000b3a783fcf7be9ecd6414f2fe918 (diff)
downloadruby-7670800476ee0bc0526cb4fe42dcc29080bb7b6f.tar.gz
ruby-7670800476ee0bc0526cb4fe42dcc29080bb7b6f.tar.xz
ruby-7670800476ee0bc0526cb4fe42dcc29080bb7b6f.zip
* hash.c (replace_i): ignore when key == Qundef.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--hash.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 73fd7f7a3..ed7fe6f6f 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 7a08b0d50..2d99df3ce 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;
}