From 035226e1fe71085c7c9c84dacd14448870fca9da Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 8 Mar 2000 06:25:19 +0000 Subject: 2000-03-08 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'string.c') diff --git a/string.c b/string.c index 6fcd7d257b..d7445301f6 100644 --- a/string.c +++ b/string.c @@ -2483,6 +2483,13 @@ rb_str_scan(str, pat) return str; } +static VALUE +rb_f_scan(self, pat) + VALUE self, pat; +{ + return rb_str_scan(uscore_get(), pat); +} + static VALUE rb_str_hex(str) VALUE str; @@ -2755,6 +2762,7 @@ Init_String() rb_define_global_function("chomp!", rb_f_chomp_bang, -1); rb_define_global_function("split", rb_f_split, -1); + rb_define_global_function("scan", rb_f_scan, 1); rb_define_method(rb_cString, "slice", rb_str_aref_m, -1); rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1); -- cgit v1.2.3