From 1519e441a0676b8aaea8dbc123ad09cd9e6e449e Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 3 May 2014 23:35:24 +0900 Subject: 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. --- mrbgems/mruby-array-ext/src/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrbgems/mruby-array-ext/src/array.c') diff --git a/mrbgems/mruby-array-ext/src/array.c b/mrbgems/mruby-array-ext/src/array.c index 12d0ec743..ae9d8296e 100644 --- a/mrbgems/mruby-array-ext/src/array.c +++ b/mrbgems/mruby-array-ext/src/array.c @@ -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 -- cgit v1.2.3