From: "David A. Black" Date: 2009-07-22T09:24:46+09:00 Subject: Re: Standard Deviation question regarding EDOM errors --1926193751-292987292-1248222271=:24914 Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-292987292-1248222271=:24914" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-292987292-1248222271=:24914 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT Hi -- On Wed, 22 Jul 2009, Älphä Blüë wrote: > def sum > @arr.inject {|a,b| a + b } > end @arr.inject(0.0) {|a,b| a + b } which will give you a float error (which corresponds to what you have in the method version). > So, compared to the class now, versus the method I created, do you see > any anomolies that would change this behavior? See above :-) David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Now available: The Well-Grounded Rubyist (http://manning.com/black2) Training! Intro to Ruby, with Black & Kastner, September 14-17 (More info: http://rubyurl.com/vmzN) --1926193751-292987292-1248222271=:24914-- --1926193751-292987292-1248222271=:24914--