use proper length for mrb_get_values_at()

separate mrb_range_beg_len() into two: the one truncates range into the
sequence size, and the one does not.  #values_at uses the latter.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-05-03 23:35:24 +09:00
parent 206c96e4a7
commit 1519e441a0
3 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ mrb_ary_values_at(mrb_state *mrb, mrb_value self)
mrb_get_args(mrb, "*", &argv, &argc);
return mrb_get_values_at(mrb, self, MRB_INT_MAX, argc, argv, mrb_ary_ref);
return mrb_get_values_at(mrb, self, RARRAY_LEN(self), argc, argv, mrb_ary_ref);
}
void