diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-26 18:48:47 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-26 18:48:47 +0000 |
commit | ad049bc5df91104e0d59e014b2b244b47694d2ef (patch) | |
tree | 77417603b77ac36ff0ffabf339aa5a6bd4124783 /hash.c | |
parent | f327dd57bb9da29ed3ad74dbec2af3854d2906db (diff) |
* hash.c (rb_any_hash): fixed performance issues with nil, true,
false as hash keys. a patch from Matthias Waechter.
[ruby-core:21568]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -69,6 +69,9 @@ rb_any_hash(VALUE a) switch (TYPE(a)) { case T_FIXNUM: case T_SYMBOL: + case T_NIL: + case T_FALSE: + case T_TRUE: hnum = (int)a; break; |