jzakiya wrote:
> The code in fib.(awk,pl,py.scm) is also correct.
> 
> But in the lastest ruby-1.9.1-p378 source code
> 
> the file fib.rb (and fib.(awk,pl,py,scm) files)
> 
> has the same date but the code has been changed to
> give an incorrect value for fib(0), which should be 0:

So you have two complaints:

(1) The files are different between two different versions of ruby (1.8 
and 1.9), but have the same timestamp in the respective tarfiles.

(2) The new files are computing fib(0) "incorrectly".

Actually, you're not entirely right in case (1). I see that:

* ruby-1.8.6-p388/sample/fib.rb and ruby-1.9.1-p378/sample/fib.rb are 
identical

$ diff -u ruby-1.8.6-p388/sample/fib.rb ruby-1.9.1-p378/sample/fib.rb
$

* ruby-1.9.1-p378 contains benchmark/other-lang/fib.rb (with slightly 
different code), but it does not exist in ruby-1.8.6-p388 at all.

Regarding your point (2): the code you are referring to is in the 
benchmark/ directory, so I don't think the return value is important. 
After all, the code for the other languages is doing exactly the same.

The "correct" version of the code is still in the sample/ directory.

Looking at 'svn log', the benchmark directory found its way into trunk 
when YARV was merged in. There's no explanation of why the code used for 
benchmarking was slightly different to the fib sample code.

You can always raise a ticket on redmine.ruby-lang.org if you are 
unhappy about the algorithms used in the benchmarks, but it seems pretty 
trivial to me.
-- 
Posted via http://www.ruby-forum.com/.