summaryrefslogtreecommitdiffhomepage
path: root/src/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/array.c')
-rw-r--r--src/array.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/array.c b/src/array.c
index 21c7e5d86..6f04efe84 100644
--- a/src/array.c
+++ b/src/array.c
@@ -658,6 +658,9 @@ aget_index(mrb_state *mrb, mrb_value index)
if (mrb_fixnum_p(index)) {
return mrb_fixnum(index);
}
+ else if (mrb_float_p(index)) {
+ return mrb_float(index);
+ }
else {
mrb_int i;