On Feb 15, 2010, at 9:47 PM, Marnen Laibow-Koser wrote:
> Gui Djos wrote:
>>  if a == 0
>>    puts "Not a second degree equation.\n\n"
>
> Why the \n\n?
>
>>  if delta < 0
>>    puts "Negative Delta.\n\n"
>
> Why the \n\n?

Marnen, that's probably because puts only adds a "\n" if it needs to  
so it takes "\n\n" to leave a blank line in the output.

>
>>  end
>>
>>  return x_1,x_2
>
> You can't return multiple values; you'll have to wrap them in an array
> (your assignment statement below will still work).

You can return multiple values just as you have it.  What gets  
returned is actually an array and will permit the kind of parallel  
assignment you expect.  (If you only have one value, it will get the  
array itself.)

> Are you developing test-first?  If not, that's a bad practice.

Gui, I have to agree with Marnen on this one.  Particularly for this  
kind of stuff where it is very easy to define both good and bad results.

>
>> I'll learn it when I learn it.
>
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> marnen / marnen.org


-Rob

Rob Biedenharn		http://agileconsultingllc.com
Rob / AgileConsultingLLC.com