From: koichirose Date: 2008-05-28T02:14:16+09:00 Subject: Re: A simple newbie question (arrays and strings) Dave Bass wrote: > That error message means you're trying to call the capitalize method on > something that doesn't exist. I.e. xxx.capitalise where xxx evaluates to > nil. The class NilClass doesn't have a capitalize method. Your problem > is with xxx; trying "p"-ing it. > Ok, but those 2 lines are the same, except that with list2 I take the part after ' - '. If I do: #~ j=0 #~ for i in list2 #~ puts list2[j] #~ j +=1 #~ end it works. Why are list and list2 behaving differently?