On May 20, 11:44 ¨Âí¬ ÒïçåÐáãë ¼òïçåòðáãë²®®®Àçíáéì®ãïí÷òïôåº > > File script.rb contains: > > require 'wordlist' > > It prints Wordlist got required, then prompts for an evil idea, and > > after I hit enter, gives the following error: > > script.rb:5: undefined local variable or method `code_words' for > > main:Object (NameError) > > > What am I doing wrong? > > The scripts operate each in its own "scope" so setting a variable in one > doesn't set it in the other. ¨Âéîïæ ãïîæõóéîáô æéòóô¬ âõáô ìåáó> you don't have to worry about leaked variables from one script to the > next. > To avoid it save it to a global like > $code_words I figured out this trick myself, but globals could cause problems in larger projects with name collisions... > or put it all in one .rb file. > GL! > -=r > -- > Posted viahttp://www.ruby-forum.com/. Thanks for your help. Just wanted to make sure that I wasn't making some newbie mistake. - Adlai