From 544789bd79bc3d63d52c69fa820e1ae768a9057e Mon Sep 17 00:00:00 2001 From: aamine Date: Wed, 26 Jul 2006 08:44:57 +0000 Subject: * 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 --- ext/strscan/strscan.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'ext') diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index 1dd61e5963..dcb70a7747 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)), -- cgit v1.2.3