summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-27 09:58:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-27 09:58:12 +0000
commit5752b61d8649f0b4128721753dc1b38669efdb9c (patch)
treed6efe6225781d928660e1eceae3660b8703709da /internal.h
parent227a5a2aae81d9933afb90aa3e77a84b7a768b02 (diff)
string.c: search by rb_str_index
* re.c (match_regexp): set regexp for MatchData from string. * re.c (rb_backref_set_string): create MatchData from string and set backref. * string.c (rb_pat_search, rb_str_sub, rb_str_sub_bang, str_gsub), (scan_once, rb_str_scan, rb_str_partition): use rb_str_index instead of rb_reg_search() when pattern is a String. based on the patch by Sam Rawlins <sam.rawlins@gmail.com> [Fixes GH-579] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index 37488bec8c..613a5bf018 100644
--- a/internal.h
+++ b/internal.h
@@ -821,6 +821,7 @@ VALUE rb_rational_reciprocal(VALUE x);
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
VALUE rb_reg_check_preprocess(VALUE);
long rb_reg_search0(VALUE, VALUE, long, int, int);
+void rb_backref_set_string(VALUE string, long pos, long len);
/* signal.c */
int rb_get_next_signal(void);