Peter Hickman wrote:
> Peter Bailey wrote:
>> Is
>> A
>> Test
>>
>> Program exited with code 0
>>
>> What's with the "nil?"
>>
>> Thanks,
>> Peter
>>   
> This is because you are using collect where, I suspect, you want to use
> each or perhaps drop the puts.
> 
> irb(main):004:0> stuff = [ "This", "is", "a", "test" ]
> => ["This", "is", "a", "test"]
> irb(main):005:0> stuff.collect{|x| x.capitalize }
> => ["This", "Is", "A", "Test"]
> irb(main):006:0>
> 
> Maybe that is what you want.


Thanks all you guys. Yeh, I feel kinda' dumb. That first word was 
already capitalized. Duh.

Cheers,
-Peter

-- 
Posted via http://www.ruby-forum.com/.