Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6955

Re: confusion with local variable assignment

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.ruby
Subject Re: confusion with local variable assignment
Date 2014-04-11 19:41 +0200
Message-ID <bqqnpdFj65kU1@mid.individual.net> (permalink)
References <3d3ebc5f-5c80-459e-963e-a3ffbea1dcec@googlegroups.com>

Show all headers | View raw


On 11.04.2014 15:24, Arup Rakshit wrote:
> When you write
>
> a = b # error. As b is not defined as a method or local variable
>
> But if you try -
>
> a = a or b = b, MRI parse it without error. How the `a` or `b` on the
> right side is allowed, where as I didn't define them earlier.

There was recently a thread over at ruby-forum
https://www.ruby-forum.com/topic/4487093

	robert

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

confusion with local variable assignment Arup Rakshit <tuka.08@gmail.com> - 2014-04-11 06:24 -0700
  Re: confusion with local variable assignment Robert Klemme <shortcutter@googlemail.com> - 2014-04-11 19:41 +0200
    Re: confusion with local variable assignment Arup Rakshit <tuka.08@gmail.com> - 2014-04-11 10:51 -0700
      Re: confusion with local variable assignment Robert Klemme <shortcutter@googlemail.com> - 2014-04-12 10:38 +0200

csiph-web