From: Peter Bailey Date: 2006-06-24T01:47:48+09:00 Subject: Re: Warning message about "initialized constant" Farrel Lifson wrote: > On 23/06/06, Peter Bailey wrote: >> 3 ftp.chdir('/xxxxx/xxx/xxd/xxxx') >> >> > > Variable names beginning with uppercase are treated as constants by > the Ruby interpreter. In the first iteration of the each loop the > line: > BWDFiles.each do |BWDFile| > assigns to BWDFile the first element of BWDFiles. In the next > iteration it tries to set BWDFiles to the second element but because > BWDFile is a constant it generates the warning. > > Farrel Thank you to all of you. I guess this is pretty important stuff. Because I'm a Windows guy, obviously, case has never meant much to me. It's interesting that I've never run into this problem before. Granted, I've only been doing RUBY for 3 months or so, but, obviously, all of my previous variable names must've been lowercase! Thanks again! -- Posted via http://www.ruby-forum.com/.