summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-21 10:14:43 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-21 10:14:43 +0000
commit8377e9e435b4f1434a154a1e4360d522311f720e (patch)
treedbbfa2d8f24a192aec00779c7866c16adc91d695
parent8581ce328d625ca3dadd897fc2e76ed2022fc127 (diff)
* string.c (coderange_scan): remove unused logic.
* string.c (rb_str_coderange_scan_restartable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--string.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index e54de23..cafd1e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 21 18:19:35 2014 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * string.c (coderange_scan): remove unused logic.
+
+ * string.c (rb_str_coderange_scan_restartable): ditto.
+
Mon Apr 21 14:11:48 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/stringio/stringio.c (strio_putc): fix for non-ascii
diff --git a/string.c b/string.c
index 021e135..7150791 100644
--- a/string.c
+++ b/string.c
@@ -328,9 +328,6 @@ coderange_scan(const char *p, long len, rb_encoding *enc)
}
}
}
- if (e < p) {
- return ENC_CODERANGE_BROKEN;
- }
return ENC_CODERANGE_VALID;
}
@@ -342,9 +339,6 @@ coderange_scan(const char *p, long len, rb_encoding *enc)
}
p += MBCLEN_CHARFOUND_LEN(ret);
}
- if (e < p) {
- return ENC_CODERANGE_BROKEN;
- }
return ENC_CODERANGE_VALID;
}
@@ -383,7 +377,7 @@ rb_str_coderange_scan_restartable(const char *s, const char *e, rb_encoding *enc
}
}
}
- *cr = e < p ? ENC_CODERANGE_BROKEN: ENC_CODERANGE_VALID;
+ *cr = ENC_CODERANGE_VALID;
return p - s;
}
else {
@@ -395,7 +389,7 @@ rb_str_coderange_scan_restartable(const char *s, const char *e, rb_encoding *enc
}
p += MBCLEN_CHARFOUND_LEN(ret);
}
- *cr = e < p ? ENC_CODERANGE_BROKEN: ENC_CODERANGE_VALID;
+ *cr = ENC_CODERANGE_VALID;
return p - s;
}
}