summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/string.c11
-rw-r--r--test/t/superclass.rb22
2 files changed, 12 insertions, 21 deletions
diff --git a/src/string.c b/src/string.c
index 9b5707dc0..6570c89fb 100644
--- a/src/string.c
+++ b/src/string.c
@@ -814,8 +814,6 @@ num_index:
* 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 <code>Fixnum</code>, returns the code
@@ -827,10 +825,7 @@ num_index:
* <code>nil</code> 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 <code>Regexp</code> is supplied, the matching portion of <i>str</i> is
- * returned. If a numeric parameter follows the regular expression, that
- * component of the <code>MatchData</code> is returned instead. If a
- * <code>String</code> is given, that string is returned if it occurs in
+ * If a <code>String</code> is given, that string is returned if it occurs in
* <i>str</i>. In both cases, <code>nil</code> is returned if there is no
* match.
*
@@ -842,10 +837,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
*/
diff --git a/test/t/superclass.rb b/test/t/superclass.rb
index 22d3b69cb..9fd8830b3 100644
--- a/test/t/superclass.rb
+++ b/test/t/superclass.rb
@@ -13,13 +13,13 @@
[:Array, :Object, '15.2.12.2'],
[:Hash, :Object, '15.2.13.2'],
[:Range, :Object, '15.2.14.2'],
- [:Regexp, :Object, '15.2.15.2'],
- [:MatchData, :Object, '15.2.16.2'],
+# [:Regexp, :Object, '15.2.15.2'], #No Regexp in mruby core
+# [:MatchData, :Object, '15.2.16.2'],
[:Proc, :Object, '15.2.17.2'],
- [:Struct, :Object, '15.2.18.2'],
- [:Time, :Object, '15.2.19.2'],
- [:IO, :Object, '15.2.20.2'],
- [:File, :IO, '15.2.21.2'],
+# [:Struct, :Object, '15.2.18.2'],
+# [:Time, :Object, '15.2.19.2'],
+# [:IO, :Object, '15.2.20.2'],
+# [:File, :IO, '15.2.21.2'],
[:Exception, :Object, '15.2.22.2'],
[:StandardError, :Exception, '15.2.23.2'],
[:ArgumentError, :StandardError, '15.2.24.2'],
@@ -28,16 +28,16 @@
[:RegexpError, :StandardError, '12.2.27.2'],
[:RuntimeError, :StandardError, '12.2.28.2'],
[:TypeError, :StandardError, '12.2.29.2'],
- [:ZeroDivisionError, :StandardError, '12.2.30.2'],
+# [:ZeroDivisionError, :StandardError, '12.2.30.2'], # No ZeroDivisionError in mruby
[:NameError, :StandardError, '15.2.31.2'],
[:NoMethodError, :NameError, '15.2.32.2'],
[:IndexError, :StandardError, '15.2.33.2'],
- [:IOError, :StandardError, '12.2.34.2'],
- [:EOFError, :IOError, '12.2.35.2'],
- [:SystemCallError, :StandardError, '15.2.36.2'],
+# [:IOError, :StandardError, '12.2.34.2'],
+# [:EOFError, :IOError, '12.2.35.2'],
+# [:SystemCallError, :StandardError, '15.2.36.2'],
[:ScriptError, :Exception, '12.2.37.2'],
[:SyntaxError, :ScriptError, '12.2.38.2'],
- [:LoadError, :ScriptError, '12.2.39,2'],
+# [:LoadError, :ScriptError, '12.2.39,2'],
].each do |cls, super_cls, iso|
assert "Direct superclass of #{cls}", iso do
skip "#{cls} isn't defined" unless Object.const_defined? cls