From: shadow cipher Date: 2007-07-07T01:24:22+09:00 Subject: keep getting an error saying that this array value is nil, however it is not nil ------=_Part_178068_30262069.1183739064920 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline elemkeysraw = str.split(/=(?!>)/) i = elemkeysraw.length scr.printw("This is the value of hashargs is #{hashargs} and it's class is #{hashargs.class} and elemkeysraw[i] is #{elemkeysraw[i]} elemkeysraw[i].split(/=>/)[0] is #{elemkeysraw[i].split(/=>/)[0]}") This is the chunk of code,, and the elemkeysraw[i].split(/=>/)[0] causes an error; private method `split' called for nil:NilClass (NoMethodError) However elemkeysraw[i] provides a value. What's the deal with this? I'm guessing it is because the fact that "i" is not evaluated until runtime, but why does the element reference work, but not when attempting to use a string method on the value that is contained there? ------=_Part_178068_30262069.1183739064920--