summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-09-22 19:10:03 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-09-22 19:10:48 +0900
commit2cb6c2778134575e425cd5d1bdef036100a25d0d (patch)
tree29674e849669c4929afab4e0bd2eebfc5c0339d9 /src
parente47f0fc0c2d23c8dbf196c8885d1c295c9150265 (diff)
downloadmruby-2cb6c2778134575e425cd5d1bdef036100a25d0d.tar.gz
mruby-2cb6c2778134575e425cd5d1bdef036100a25d0d.zip
String#index should no longer take integer argument
Diffstat (limited to 'src')
-rw-r--r--src/string.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/string.c b/src/string.c
index 12aefa8a0..e7049d678 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1389,17 +1389,6 @@ mrb_str_index_m(mrb_state *mrb, mrb_value str)
}
switch (mrb_type(sub)) {
- case MRB_TT_FIXNUM: {
- mrb_int c = mrb_fixnum(sub);
- mrb_int len = RSTRING_LEN(str);
- unsigned char *p = (unsigned char*)RSTRING_PTR(str);
-
- for (;pos<len;pos++) {
- if (p[pos] == c) return mrb_fixnum_value(pos);
- }
- return mrb_nil_value();
- }
-
default: {
mrb_value tmp;