This post originated from an RSS feed registered with Ruby Buzz
by Daniel Berger.
Original Post: The good thing about finding bugs
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Is that sometimes it forces you to refactor methods completely. I discovered yesterday that the Pathname#realpath method in the pathname2 package did not descend more than one level deep! Oof.
Not only did it not work, it was seriously overwrought. So, I started from scratch, managed to eliminate two nested 'if' blocks, made the logic *much* simpler, and cut the LOC down from 20 to 13. Oh, and it actually works now, too. That's always a bonus.