ruby-changes:2778
From: ko1@a...
Date: 17 Dec 2007 18:45:03 +0900
Subject: [ruby-changes:2778] matz - Ruby:r14269 (trunk): * string.c (scan_once): need no encoding compatibility check.
matz 2007-12-17 18:44:06 +0900 (Mon, 17 Dec 2007)
New Revision: 14269
Modified files:
trunk/ChangeLog
trunk/re.c
trunk/string.c
Log:
* string.c (scan_once): need no encoding compatibility check.
it's done inside of re_reg_seach().
* string.c (rb_str_split_m): ditto.
* re.c (rb_reg_regsub): ditto.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/string.c?r1=14269&r2=14268
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14269&r2=14268
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=14269&r2=14268
Index: re.c
===================================================================
--- re.c (revision 14268)
+++ re.c (revision 14269)
@@ -2695,7 +2695,6 @@
int no, clen;
rb_encoding *enc = rb_enc_check(str, src);
- rb_enc_check(str, regexp);
p = s = RSTRING_PTR(str);
e = s + RSTRING_LEN(str);
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14268)
+++ ChangeLog (revision 14269)
@@ -1,3 +1,12 @@
+Mon Dec 17 18:42:23 2007 Yukihiro Matsumoto <matz@r...>
+
+ * string.c (scan_once): need no encoding compatibility check.
+ it's done inside of re_reg_seach().
+
+ * string.c (rb_str_split_m): ditto.
+
+ * re.c (rb_reg_regsub): ditto.
+
Mon Dec 17 17:50:30 2007 Yukihiro Matsumoto <matz@r...>
* string.c (rb_str_index): check if substring is broken.
Index: string.c
===================================================================
--- string.c (revision 14268)
+++ string.c (revision 14269)
@@ -4129,9 +4129,6 @@
int last_null = 0;
struct re_registers *regs;
- if (RREGEXP(spat)->len != 0) {
- enc = rb_enc_check(str, spat);
- }
while ((end = rb_reg_search(spat, str, start, 0)) >= 0) {
regs = RMATCH(rb_backref_get())->regs;
if (start == end && BEG(0) == END(0)) {
@@ -4733,7 +4730,7 @@
struct re_registers *regs;
long i;
- enc = rb_enc_check(str, pat);
+ enc = rb_enc_get(str);
if (rb_reg_search(pat, str, *start, 0) >= 0) {
match = rb_backref_get();
regs = RMATCH(match)->regs;
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml