diff options
author | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-02 02:24:45 +0000 |
---|---|---|
committer | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-02 02:24:45 +0000 |
commit | 76bb017ad2c818f5250047a935e1ba44e1a7c40d (patch) | |
tree | fe568b45d07d4b92b392aa4326f151cec9b408da | |
parent | cf3ff02e9c0c074ecabdb1fa2ca1b5f8c01c831f (diff) |
re.c: count associated Regexp object in MatchData#hash
Don't discard the hash value computed for the regexp object. It seems it
was simply missed out in r24754, when MatchData#hash was initially
implemented.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | re.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2950,7 +2950,7 @@ match_hash(VALUE match) const struct re_registers *regs; st_index_t hashval = rb_hash_start(rb_str_hash(RMATCH(match)->str)); - rb_hash_uint(hashval, reg_hash(RMATCH(match)->regexp)); + hashval = rb_hash_uint(hashval, reg_hash(RMATCH(match)->regexp)); regs = RMATCH_REGS(match); hashval = rb_hash_uint(hashval, regs->num_regs); hashval = rb_hash_uint(hashval, rb_memhash(regs->beg, regs->num_regs * sizeof(*regs->beg))); |