def test_slicing_arrays
array = [:peanut, :butter, :and, :jelly]
assert_equal [:peanut], array[0,1]
assert_equal [:peanut, :butter], array[0,2]
assert_equal [:and, :jelly], array[2,2]
assert_equal [:and, :jelly], array[2,20]
assert_equal [], array[4,0]
assert_equal [], array[4,100]
assert_equal nil, array[5,0]
end
ZGVmIHRlc3Rfc2xpY2luZ19hcnJheXMKICAgIGFycmF5ID0gWzpwZWFudXQsIDpidXR0ZXIsIDphbmQsIDpqZWxseV0KCiAgICBhc3NlcnRfZXF1YWwgWzpwZWFudXRdLCBhcnJheVswLDFdCiAgICBhc3NlcnRfZXF1YWwgWzpwZWFudXQsIDpidXR0ZXJdLCBhcnJheVswLDJdCiAgICBhc3NlcnRfZXF1YWwgWzphbmQsIDpqZWxseV0sIGFycmF5WzIsMl0KICAgIGFzc2VydF9lcXVhbCBbOmFuZCwgOmplbGx5XSwgYXJyYXlbMiwyMF0KICAgIGFzc2VydF9lcXVhbCBbXSwgYXJyYXlbNCwwXQogICAgYXNzZXJ0X2VxdWFsIFtdLCBhcnJheVs0LDEwMF0KICAgIGFzc2VydF9lcXVhbCBuaWwsIGFycmF5WzUsMF0KICBlbmQ=