From eab4a7492f674d859fb497ca6eb025956e6453b7 Mon Sep 17 00:00:00 2001 From: Jun Hiroe Date: Sun, 15 Jun 2014 21:21:20 +0900 Subject: Unsupported Regex in mrb_str_aref_m() --- src/string.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src') diff --git a/src/string.c b/src/string.c index 9b5707dc0..8015391b6 100644 --- a/src/string.c +++ b/src/string.c @@ -813,9 +813,6 @@ num_index: * str[other_str] => new_str or nil * str.slice(fixnum) => fixnum or nil * str.slice(fixnum, fixnum) => new_str or nil - * str.slice(range) => new_str or nil - * str.slice(regexp) => new_str or nil - * str.slice(regexp, fixnum) => new_str or nil * str.slice(other_str) => new_str or nil * * Element Reference---If passed a single Fixnum, returns the code @@ -827,10 +824,7 @@ num_index: * nil if the initial offset falls outside the string, the length * is negative, or the beginning of the range is greater than the end. * - * If a Regexp is supplied, the matching portion of str is - * returned. If a numeric parameter follows the regular expression, that - * component of the MatchData is returned instead. If a - * String is given, that string is returned if it occurs in + * If a String is given, that string is returned if it occurs in * str. In both cases, nil is returned if there is no * match. * @@ -842,10 +836,6 @@ num_index: * a[-4..-2] #=> "her" * a[12..-1] #=> nil * a[-2..-4] #=> "" - * a[/[aeiou](.)\1/] #=> "ell" - * a[/[aeiou](.)\1/, 0] #=> "ell" - * a[/[aeiou](.)\1/, 1] #=> "l" - * a[/[aeiou](.)\1/, 2] #=> nil * a["lo"] #=> "lo" * a["bye"] #=> nil */ -- cgit v1.2.3