Slice management Implementation in Ruby