mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user