mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* hash.c: remove unnecessary checks for Qundef in hash iterations.
since hash use st_foreach_check for iterations, such checks are needless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d4f379ad93
commit
a3626110d9
3 changed files with 16 additions and 36 deletions
|
|
@ -42,10 +42,9 @@ numhash_aset(VALUE self, VALUE key, VALUE data)
|
|||
}
|
||||
|
||||
static int
|
||||
numhash_i(st_data_t key, st_data_t value, st_data_t arg, int error)
|
||||
numhash_i(st_data_t key, st_data_t value, st_data_t arg)
|
||||
{
|
||||
VALUE ret;
|
||||
if (key == 0 && value == 0 && error == 1) rb_raise(rb_eRuntimeError, "numhash modified");
|
||||
ret = rb_yield_values(3, (VALUE)key, (VALUE)value, (VALUE)arg);
|
||||
if (ret == Qtrue) return ST_CHECK;
|
||||
return ST_CONTINUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue