summaryrefslogtreecommitdiff
path: root/spec/sdiff_spec.rb
diff options
context:
space:
mode:
authorAustin Ziegler <austin@halostatue.ca>2011-08-01 13:46:14 -0400
committerAustin Ziegler <austin@halostatue.ca>2011-08-01 13:46:14 -0400
commit0cd7c7a6855b8439edb5b48fa71f9d7ebdc3344a (patch)
treef6ac624cfe3c48776a20c2b35702e7c3517c5c11 /spec/sdiff_spec.rb
parentd3ae2094927ca241e339aea21d7439ace86c364c (diff)
downloaddiff-lcs-0cd7c7a6855b8439edb5b48fa71f9d7ebdc3344a.tar.gz
Fixing an error in helper balanced_reverse sorting
Found with rbx-head, Array#sort_by isn't a stable sort in rbx but appears to be in most other Rubies. Thus the array [ [ '-', 1, 1 ], [ '-', 1, 2 ], [ '-', 2, 2 ] ] would be sorted properly with the code #sort_by { |line| line[1] } on most Rubies, but rbx might sort it as [ [ '-', 1, 2 ], [ '-', 1, 1 ], [ '-', 2, 2 ] ] Changing the sort to #sort_by { |line| [ line[1], line[2] ] } fixes this.
Diffstat (limited to 'spec/sdiff_spec.rb')
0 files changed, 0 insertions, 0 deletions