summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-09-23 01:06:11 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-09-23 01:06:26 +0900
commit6a06a3e48d4fbe55698eb285e48ffaf58385fe3b (patch)
tree6fe39b540d6c050ae5d67fd3b8c3e1e0de78cb1b /src/string.c
parent418eec2c7d14197b3fac80957f6d45c92dd80942 (diff)
downloadmruby-6a06a3e48d4fbe55698eb285e48ffaf58385fe3b.tar.gz
mruby-6a06a3e48d4fbe55698eb285e48ffaf58385fe3b.zip
String#rindex should no longer take integer argument
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/string.c b/src/string.c
index e7049d678..031429e38 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1725,16 +1725,6 @@ mrb_str_rindex_m(mrb_state *mrb, mrb_value str)
mrb_regexp_check(mrb, sub);
switch (mrb_type(sub)) {
- case MRB_TT_FIXNUM: {
- mrb_int c = mrb_fixnum(sub);
- unsigned char *p = (unsigned char*)RSTRING_PTR(str);
-
- for (pos=len-1;pos>=0;pos--) {
- if (p[pos] == c) return mrb_fixnum_value(pos);
- }
- return mrb_nil_value();
- }
-
default: {
mrb_value tmp;