datamapper/dm-is-list — pull request #4 by rdvdijk (2011-11-12 21:16:07+00:00)
Title: Make :above and :below move items directly above and belove the passed item.

Hi,

I noticed that when using :below and :above does not move items if the given item is already below or above the target item. So:

[1 2 3 4 5]

Moving '2' above '4' would do nothing, since '2' is already above '4'. However, I feel that moving '2' above '4' should place it directly above it, and resulting in:

[1 3 2 4 5]

Same holds for :below. I've created tests for these cases and altered the code.

Kind regards,
Roel