I have two HTML pages, whose source code I want to compare. I have converted the page source to strings, and I need to know what will be the best way to compare both huge strings.
page1.eql?(page2)
?str.eql?(str1)
also compare symbols e.g., @
?I would really appreciate to know the best approach for comparison.
I'm not sure how detailed you want your comparison to be. If you want "diff-like" capabilities, you can check out a previous similar question asked: diff a ruby string or array