diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-22 09:08:58 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-22 09:08:58 +0000 |
| commit | 9133ad845e607a0b4a7aa5cf87cad5bd0cd0462a (patch) | |
| tree | 34e1ec76b4363721c738d6fc7b1e8d85b9665186 /string.c | |
| parent | 85bde38a3539ad1d4e2e89df97b2d3a52ebd49d1 (diff) | |
| download | ruby-9133ad845e607a0b4a7aa5cf87cad5bd0cd0462a.tar.gz ruby-9133ad845e607a0b4a7aa5cf87cad5bd0cd0462a.tar.xz ruby-9133ad845e607a0b4a7aa5cf87cad5bd0cd0462a.zip | |
* string.c (rb_str_partition): no need to call rb_call_super(),
since String is no longer includes Enumerable.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -4424,14 +4424,11 @@ rb_str_center(int argc, VALUE *argv, VALUE str) */ static VALUE -rb_str_partition(int argc, VALUE *argv, VALUE str) +rb_str_partition(VALUE str, VALUE sep) { - VALUE sep; long pos; int regex = Qfalse; - if (argc == 0) return rb_call_super(argc, argv); - rb_scan_args(argc, argv, "1", &sep); if (TYPE(sep) == T_REGEXP) { pos = rb_reg_search(sep, str, 0, 0); regex = Qtrue; @@ -4938,7 +4935,7 @@ Init_String(void) rb_define_method(rb_cString, "slice", rb_str_aref_m, -1); rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1); - rb_define_method(rb_cString, "partition", rb_str_partition, -1); + rb_define_method(rb_cString, "partition", rb_str_partition, 1); rb_define_method(rb_cString, "rpartition", rb_str_rpartition, 1); id_to_s = rb_intern("to_s"); |
