summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-30 22:47:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-30 22:47:33 +0000
commitd0380e2e567d9ffa1423c8b6fda3470f11b753c3 (patch)
tree4fc20fae5a3155f37fd3ac73dd627317bc9c113e /hash.c
parent4fa32366008a81c8ea398ce36e53f23f659530c2 (diff)
* hash.c (st_foreach_safe): since table is not for VALUE, Qundef is
not special value, so use 0 instead. therefore this function can be applied to only st_table which 0 is invalid as keys, e.g., IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 328917862c..b036e8bf8a 100644
--- a/hash.c
+++ b/hash.c
@@ -131,7 +131,7 @@ st_foreach_safe(st_table *table, int (*func)(ANYARGS), st_data_t a)
arg.tbl = table;
arg.func = (st_foreach_func *)func;
arg.arg = a;
- if (st_foreach_check(table, foreach_safe_i, (st_data_t)&arg, (st_data_t)Qundef)) {
+ if (st_foreach_check(table, foreach_safe_i, (st_data_t)&arg, 0)) {
rb_raise(rb_eRuntimeError, "hash modified during iteration");
}
}