summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-28 02:28:18 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-28 02:28:18 (GMT)
commit9d1bf5b33a118c65772f791cfc43276c070b1892 (patch)
treee2211a38dc6a6f23111226e987f8042a3abc6147 /re.c
parent2f14bde88fc25fd49c5d72bac71e1f0381df944a (diff)
string.c: infect match result
* string.c (rb_pat_search): match result should be infected by the pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/re.c b/re.c
index 70194be..89910f6 100644
--- a/re.c
+++ b/re.c
@@ -1235,6 +1235,7 @@ match_set_string(VALUE m, VALUE string, long pos, long len)
rmatch->regs.beg[0] = pos;
rmatch->regs.end[0] = pos + len;
rmatch->char_offset_updated = 0;
+ OBJ_INFECT(match, string);
}
void