diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-02-06 08:25:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-02-06 08:25:12 +0000 |
commit | 594ca463f7c2ee81be6bf1962c077f81f81f4186 (patch) | |
tree | 4500e3bcab21330db6d18bb65f41c32a118a446e /string.c | |
parent | 8ea428f34106ac795c15c8e74283fb8450df9b0e (diff) | |
download | ruby-594ca463f7c2ee81be6bf1962c077f81f81f4186.tar.gz ruby-594ca463f7c2ee81be6bf1962c077f81f81f4186.tar.xz ruby-594ca463f7c2ee81be6bf1962c077f81f81f4186.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@3449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2478,7 +2478,7 @@ rb_str_count(argc, argv, str) } s = RSTRING(str)->ptr; - if (!s || RSTRING(str)->len == 0) return Qnil; + if (!s || RSTRING(str)->len == 0) return INT2FIX(0); send = s + RSTRING(str)->len; i = 0; while (s < send) { |