yeah - I played around with that section a bit and the collect was from
an alternative way of working.
···
-----Original Message-----
From: James Edward Gray II [mailto:james@grayproductions.net]
Sent: Thursday, 15 September 2005 7:37 AM
To: ruby-talk ML
Subject: Re: [SOLUTION] NDiff (#46)
On Sep 12, 2005, at 8:24 PM, Daniel Sheppard wrote:
<<quiz_46_ndiff.rb>> This quiz made me delve into the darkened
alleyways of undocumented standard libraries (well, bigdecimal).
Luckily
the whole thing worked exactly as guessed - probably why nobody has
bothered documenting it yet.
Nice solution.
Just one small comment:
..
SyncEnumerator.new(file1, file2).each do |line1, line2|
line1, line2 = NumberLine.new(line1), NumberLine.new(line2)
SyncEnumerator.new(line1, line2).collect { |num1, num2| distances
<< (num1 - num2).abs } end ...
I'm pretty sure you meant each() instead of collect() for that second
SyncEnumerator. I just wanted to point that out, since I changed it in
the quiz summary.
James Edward Gray II
#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################