super_diff icon indicating copy to clipboard operation
super_diff copied to clipboard

Hash diff duplicates lines

Open Nakilon opened this issue 7 months ago • 2 comments

I wonder why this issue remains since 0.9.0

      expect({1=>2, 2=>3, 3=>4}).to eq({3=>1, 2=>3, 1=>3})
         {
       -   1 => 3
       +   1 => 2,
           2 => 3,
       -   1 => 3
       -   3 => 1,
       +   3 => 4
         }

The amount of duplicating lines can be enormous.

Nakilon avatar May 20 '25 12:05 Nakilon

Looks like I just provided a simple example to reproduce https://github.com/splitwise/super_diff/issues/99

Instead of fixing real issues we do stuff like bumping required_ruby_version for no reason. Probably just to make the gem not runnable at all so bug won't happen.

Nakilon avatar May 20 '25 12:05 Nakilon

@Nakilon , thanks for the small repro case, that will be very helpful for debugging!

Instead of fixing real issues we do stuff like bumping required_ruby_version for no reason. Probably just to make the gem not runnable at all so bug won't happen.

I understand this bug is frustrating, but please practice empathy. Information that can help us identify and solve the issue is really useful; saying things like what I've quoted is not. (And of course, if you can find the bug before we do, feel free to open a PR!)

jas14 avatar May 21 '25 15:05 jas14

As you said, #99 is the same issue. I'll close this as a duplicate and continue discussion there.

jas14 avatar Jun 03 '25 02:06 jas14