aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-11-16 02:29:32 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-11-16 02:29:32 +0900
commit9779e11645a619f53810893371e778afc3c0336b (patch)
tree8e62bb61bb775fe1963be8d1205dbb468e59869f
parent4f2ac9e30035a7d48e7856007d72a55f110ba8e9 (diff)
downloadruby-matchdata-hash-fix.tar.gz
re.c: fix MatchData#hashmatchdata-hash-fix
Don't discard the result of rb_hash_uint() calculated for the Regexp.
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index 6574d9f..cccfcc8 100644
--- a/re.c
+++ b/re.c
@@ -2952,7 +2952,7 @@ match_hash(VALUE match)
match_check(match);
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)));