From: Glen Holcomb Date: 2007-09-12T00:37:10+09:00 Subject: Re: undefined method `+' for nil:NilClass (NoMeth ------=_Part_24306_10269189.1189525029375 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I don't see $JOB being defined anywhere. On 9/11/07, Mahen Surinam wrote: > > Dear All, > > Am trying to create a character generator in RUBY. it will create > characters from a-z in the folowing way: > > a > b > c > z > aa > ab > ac > > and so on. sor here is my first code: > > > Array = ['a', 'b', 'c' ,'d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', > 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] > > $Text = ""; > $OldText = ""; > $OldText2 = "" > $OldText3 = "" > > def Join() > $Text = $Oldtext3 + $OldText2 + $OldText + $JOB > end > > while (1) > Array.each do |$JOB| > Join() > puts $Text > end > end > > > > Eventually, $oldtext2-3 will be filled in later, bt am geting this > error: > > C:/WINDOWS/thread.rb:10:in `Join': undefined method `+' for nil:NilClass > (NoMeth > odError) > from C:/WINDOWS/thread.rb:15 > from C:/WINDOWS/thread.rb:14:in `each' > from C:/WINDOWS/thread.rb:14 > > C:\WINDOWS> > > > > > > Could someone please shed some light > -- > Posted via http://www.ruby-forum.com/. > > -- "Hey brother Christian with your high and mighty errand, Your actions speak so loud, I can't hear a word you're saying." -Greg Graffin (Bad Religion) ------=_Part_24306_10269189.1189525029375--