Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

#Insert_at(pos) inserts at wrong position when moving down #5

Open
javinto opened this issue Aug 18, 2010 · 0 comments
Open

#Insert_at(pos) inserts at wrong position when moving down #5

javinto opened this issue Aug 18, 2010 · 0 comments

Comments

@javinto
Copy link

javinto commented Aug 18, 2010

If find this an unexpected result from the #insert_at(pos) method:

Suppose you have:
1 A
2 B
3 C
4 D
5 E
6 F
7 G

And you move E to position 3 (before C) by #insert_at(3) the result will be as expected:
1 A
2 B
3 E
4 C
5 D
6 F
7 G

But now - starting all over - you move C to position 6 (before F), the result will be unexpected:
1 A
2 B
3 D
4 E
5 F
6 C
7 G

Technically, yes C has arrived on position 6, but NOT before 'F' as meant to be from a sorting point of view.

I consider this an issue. One way to solve it, is by adding a new method #move_to(pos) ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant