summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-11 23:52:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-11 23:52:20 +0000
commit53f0a8ade14ff8bb82cc1c7cd4c28139acdd4734 (patch)
treeeb622401eadba5fd69c89f1d8b0ae91b2133ddf1 /string.c
parentd222472299a9c2ce8fc094c162f1acd2f4199403 (diff)
* io.c (read_all): should use io_read_encoding(), not
io_input_encoding(). * io.c (rb_io_getline_1): reduce calling of io_read_encoding(). * string.c (rb_str_scan): need not to restore $~ value, so avoid pinning match object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/string.c b/string.c
index ef54b7e459..d123207fd4 100644
--- a/string.c
+++ b/string.c
@@ -5705,11 +5705,8 @@ rb_str_scan(VALUE str, VALUE pat)
}
while (!NIL_P(result = scan_once(str, pat, &start))) {
- match = rb_backref_get();
- rb_match_busy(match);
rb_yield(result);
str_mod_check(str, p, len);
- rb_backref_set(match); /* restore $~ value */
}
rb_backref_set(match);
return str;