[Pdx-pm] Answer to Ruby question

Ovid poec at yahoo.com
Thu Nov 14 12:03:24 CST 2002


--- Phil Tomson <ptkwt at aracnet.com> wrote:
> Hi,
> 
> Good meeting this evening...
> 
> Someone asked me a question about what happens in Ruby when you have a 
> typo in your variable name and try to assign an undefined variable to 
> another like so:
> 
> astring = "this is a string"
> b = asting
> 
> When you try to run ruby on this, ruby reports:
> undefined.rb:2: undefined local variable or method `asting' for 
> #<Object:0x401d9ce0> (NameError)

Phil,

Thanks for the answer on that!  It seems like an obvious way to go about it.

I'd recommend other Perl Mongers check out Ruby.  It's a great language.

Cheers,
Ovid

=====
"Ovid" on http://www.perlmonks.org/
Web Programming with Perl:  http://users.easystreet.com/ovid/cgi_course/
Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com



More information about the Pdx-pm-list mailing list