Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #7161
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | Re: undefined local variable or method `city' for #<Context:0x10099d8> |
| Date | 2015-12-11 07:09 +0100 |
| Message-ID | <dcv7kjFrgr0U1@mid.individual.net> (permalink) |
| References | <9589d281-0b8c-4c61-ba55-6992cc2957c8@googlegroups.com> |
On 11.12.2015 07:00, gengyangcai@gmail.com wrote: > first_name = gets.chomp > last_name = city > > undefined local variable or method `city' for #<Context:0x10099d8> > > What does "undefined local variable or method `city' for > #<Context:0x10099d8>" mean? Tried searching in Google, but no results > were returned ... Obviously #city is undefined at the point of execution. You see this effect: $ ruby2.0 -e 'x=city' -e:1:in `<main>': undefined local variable or method `city' for main:Object (NameError) But we are lacking context - or rather: Context. robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar
undefined local variable or method `city' for #<Context:0x10099d8> gengyangcai@gmail.com - 2015-12-10 22:00 -0800
Re: undefined local variable or method `city' for #<Context:0x10099d8> Robert Klemme <shortcutter@googlemail.com> - 2015-12-11 07:09 +0100
Re: undefined local variable or method `city' for #<Context:0x10099d8> gengyangcai@gmail.com - 2015-12-10 22:17 -0800
Re: undefined local variable or method `city' for #<Context:0x10099d8> Pratap Patil <pratap477@gmail.com> - 2016-10-21 04:38 -0700
csiph-web