Closed gbence closed 9 years ago
Thanks, merged! Although I took the liberty to refactor your changes a bit. Could you make sure that it still does what you intended? In particular, why did you want i.get(0..5)
and i.get(-5..0)
to fail? I leveraged Ruby's rb_range_beg_len
instead of GSL's get_range_int_beg_en_n
to get Array#[]
-like behaviour.
Originally, alarming crashes were recognized when GSL::Index#get was given over-its-size indices. These lead to the tests and then the fix in its basis (GSL::Permutation in permutation.c).