10000 * re.c (rb_reg_initialize_m): 3rd argument was ignored. · documenting-ruby/ruby@e2b9240 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2b9240

Browse files
author
matz
committed
* re.c (rb_reg_initialize_m): 3rd argument was ignored.
* string.c (rb_str_count): return 0 for empty string (was returning nil). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent da19d16 commit e2b9240

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

ChangeLog

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Thu Feb 6 11:44:40 2003 MoonWolf <moonwolf@moonwolf.com>
2+
3+
* re.c (rb_reg_initialize_m): 3rd argument was ignored.
4+
5+
Thu Feb 6 01:09:05 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
6+
7+
* string.c (rb_str_count): return 0 for empty string (was
8+
returning nil).
9+
110
Wed Feb 5 19:41:37 2003 Tanaka Akira <akr@m17n.org>
211

312
* lib/open-uri.rb: dispatch code restructured to make it openable
@@ -8,7 +17,7 @@ Wed Feb 5 19:41:37 2003 Tanaka Akira <akr@m17n.org>
817

918
Wed Feb 5 17:11:02 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
1019

11-
* parse.y (yylex): no .<digit> floating literal anymore.
20+
* parse.y (yylex): no .<digit> float literal anymore.
1221

1322
Tue Feb 4 16:11:30 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
1423

re.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ rb_reg_initialize_m(argc, argv, self)
12651265
if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
12661266
else if (RTEST(argv[1])) flags = RE_OPTION_IGNORECASE;
12671267
}
1268-
else if (argc == 3) {
1268+
if (argc == 3) {
12691269
char *kcode = StringValuePtr(argv[2]);
12701270

12711271
switch (kcode[0]) {

string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2478,7 +2478,7 @@ rb_str_count(argc, argv, str)
24782478
}
24792479

24802480
s = RSTRING(str)->ptr;
2481-
if (!s || RSTRING(str)->len == 0) return Qnil;
2481+
if (!s || RSTRING(str)->len == 0) return INT2FIX(0);
24822482
send = s + RSTRING(str)->len;
24832483
i = 0;
24842484
while (s < send) {

0 commit comments

Comments
 (0)
0