summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1995-02-24 13:15:43 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 22:09:31 +0900
commit881c5a9c320c637ee0f6526b40cf70c1379ab656 (patch)
tree3c0327fc9bdef8f056563ceee400226ac572535b /string.c
parent2f106ab85c4f4e171374aee261f5a12bdd923c41 (diff)
version 0.68v0_68
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.67-0.68.diff.gz Fri Feb 24 13:15:43 1995 Yukihiro Matsumoto (matz@ix-02) * version 0.68 Thu Feb 23 11:19:19 1995 Yukihiro Matsumoto (matz@ix-02) * eval.c: resque節のselfの値が間違っていた. * eval.c(rb_clear_cache): キャッシュのクリアし忘れがあった. * eval.c: 定数のスコープをクラス内の静的スコープに変更した.これに よって,特異メソッドからは参照される定数は,レシーバのクラスでは なく,定義されたスコープのクラスの定数となる. Wed Feb 22 00:51:38 1995 Yukihiro Matsumoto (matz@dyna) * regex.c: ignorecaseを正規表現のコンパイル前に指定しないと正しく 動作しない.修正. * string.c(toupper,tolower): bug fix. * ENV,VERSION: readonly変数から定数へ.
Diffstat (limited to 'string.c')
-rw-r--r--string.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/string.c b/string.c
index 0b23655..a107a7f 100644
--- a/string.c
+++ b/string.c
@@ -6,7 +6,7 @@
$Date: 1995/01/10 10:43:01 $
created at: Mon Aug 9 17:12:58 JST 1993
- Copyright (C) 1994 Yukihiro Matsumoto
+ Copyright (C) 1995 Yukihiro Matsumoto
************************************************/
@@ -358,7 +358,6 @@ Fstr_cmp(str1, str2)
return INT2FIX(result);
}
-Regexp * make_regexp();
VALUE Freg_match();
extern VALUE C_Glob;
@@ -376,7 +375,7 @@ Fstr_match(x, y)
case T_STRING:
reg = re_regcomp(y);
- start = research(reg, x, 0, ignorecase);
+ start = research(reg, x, 0);
if (start == -1) {
return FALSE;
}
@@ -403,7 +402,7 @@ Fstr_match2(str)
Fail("$_ is not a string");
reg = re_regcomp(str);
- start = research(reg, rb_lastline, 0, ignorecase);
+ start = research(reg, rb_lastline, 0);
if (start == -1) {
return Qnil;
}
@@ -451,7 +450,7 @@ Fstr_index(argc, argv, str)
switch (TYPE(sub)) {
case T_REGEXP:
- pos = research(sub, str, pos, ignorecase);
+ pos = research(sub, str, pos);
break;
case T_STRING:
@@ -684,7 +683,7 @@ str_sub(str, pat, val, once)
int beg, end, offset, n;
for (offset=0, n=0;
- (beg=research(pat, str, offset, ignorecase)) >= 0;
+ (beg=research(pat, str, offset)) >= 0;
offset=RREGEXP(pat)->ptr->regs.start[0]+STRLEN(val)) {
end = RREGEXP(pat)->ptr->regs.end[0]-1;
sub = re_regsub(val);
@@ -1034,14 +1033,14 @@ static VALUE
Fstr_toupper(str)
struct RString *str;
{
- return Fstr_upcase(str_new(str_new(str->ptr, str->len)));
+ return Fstr_upcase(str_new(str->ptr, str->len));
}
static VALUE
Fstr_tolower(str)
struct RString *str;
{
- return Fstr_downcase(str_new(str_new(str->ptr, str->len)));
+ return Fstr_downcase(str_new(str->ptr, str->len));
}
struct tr {
@@ -1343,7 +1342,7 @@ Fstr_split(argc, argv, str)
#define LMATCH spat->ptr->regs.start
#define RMATCH spat->ptr->regs.end
- while ((end = research(spat, str, start, ignorecase)) >= 0) {
+ while ((end = research(spat, str, start)) >= 0) {
if (start == end && LMATCH[0] == RMATCH[0]) {
if (last_null == 1) {
if (ismbchar(str->ptr[beg]))