summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-23 01:10:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-23 01:10:12 +0000
commit10cf7c5b2a079473db81af6dd3aad29dd779d8b1 (patch)
treebd883abfe9a510d106f3e99a90f0ad1b373a6c17 /hash.c
parent152b33a1e232ef7e470b12738491a5f68fdb8763 (diff)
downloadruby-10cf7c5b2a079473db81af6dd3aad29dd779d8b1.tar.gz
hash.c: use ID_SCOPE_SHIFT
* hash.c (rb_any_hash): use ID_SCOPE_SHIFT instead of magic number. [Feature #9425] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 56917ed056..007508a3c5 100644
--- a/hash.c
+++ b/hash.c
@@ -18,6 +18,7 @@
#include "internal.h"
#include <errno.h>
#include "probes.h"
+#include "id.h"
#ifdef __APPLE__
# ifdef HAVE_CRT_EXTERNS_H
@@ -132,7 +133,7 @@ rb_any_hash(VALUE a)
if (SPECIAL_CONST_P(a)) {
if (a == Qundef) return 0;
- if (SYMBOL_P(a)) a >>= (RUBY_SPECIAL_SHIFT + 3); /* 3=ID_SCOPE_SHIFT */
+ if (SYMBOL_P(a)) a >>= (RUBY_SPECIAL_SHIFT + ID_SCOPE_SHIFT);
hnum = rb_objid_hash((st_index_t)a);
}
else if (BUILTIN_TYPE(a) == T_STRING) {