summaryrefslogtreecommitdiff
path: root/ext/strscan
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-26 08:44:57 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-26 08:44:57 +0000
commit544789bd79bc3d63d52c69fa820e1ae768a9057e (patch)
tree2c31f12bc46f04362051c1415ee1f565e3ce17eb /ext/strscan
parent79c5eb1af36690c6d45975b3db93613819230bc3 (diff)
* ext/strscan/strscan.c (strscan_do_scan): StringScanner.new("").scan(//) should return "". [ruby-Bugs:4361]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan')
-rw-r--r--ext/strscan/strscan.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 1dd61e5..dcb70a7 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -391,9 +391,6 @@ strscan_set_pos(VALUE self, VALUE v)
return INT2NUM(i);
}
-/* I should implement this function? */
-#define strscan_prepare_re(re) /* none */
-
static VALUE
strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
{
@@ -404,10 +401,6 @@ strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
GET_SCANNER(self, p);
CLEAR_MATCH_STATUS(p);
- if (EOS_P(p)) {
- return Qnil;
- }
- strscan_prepare_re(regex);
if (headonly) {
ret = onig_match(RREGEXP(regex)->ptr, (UChar* )CURPTR(p),
(UChar* )(CURPTR(p) + S_RESTLEN(p)),