diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-03 23:35:24 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-03 23:35:24 +0900 |
| commit | 1519e441a0676b8aaea8dbc123ad09cd9e6e449e (patch) | |
| tree | 52b7d512b93adff52d7aa9b5d45d1d34e45dbd46 /mrbgems/mruby-array-ext/src/array.c | |
| parent | 206c96e4a7ae37af6244ae37bc95751a2b36e73d (diff) | |
| download | mruby-1519e441a0676b8aaea8dbc123ad09cd9e6e449e.tar.gz mruby-1519e441a0676b8aaea8dbc123ad09cd9e6e449e.zip | |
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.
Diffstat (limited to 'mrbgems/mruby-array-ext/src/array.c')
| -rw-r--r-- | mrbgems/mruby-array-ext/src/array.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
