From: Sebastian Hungerecker Date: 2007-12-07T01:48:09+09:00 Subject: Re: regular expression. newbie problem. Johnathan Smith wrote: > irb(main):001:0> name.rb > NameError: undefined local variable or method `name' for main:Object > from (irb):1 You enter ruby code in irb. name.rb is not valid ruby code (well, it could be if there's an object name with a method rb, but in this case there isn't) - it's a file name. You could either write valid ruby code containing this filename (like require "name.rb" which would load the file and run the code inside it) or execute name.rb from the shell (by typing "./name.rb" or "ruby name.rb", not by typing in ruby code). Assuming of course that the file exists and contains valid ruby code. > irb(main):002:0> a = Name.new("John Matthew Johnson") > NameError: uninitialized constant Name > from (irb):2 You have not previously defined Name (at least not in the current irb session). HTH, Sebastian -- NP: Anathema - Alternative 4 Jabber: sepp2k@jabber.org ICQ: 205544826