[Wtr-general] OT: The original problem. Re: A small doubt in Ruby
Bret Pettichord
forum-watir-users at openqa.org
Sat Mar 10 12:31:14 EST 2007
> As Marick says, variables and objects are different
> kinds of things. The name of the thing is not the
> thing itself. Variables do not contain objects, they
> point to them. In the array example Chris posted, we
> assign "a", a reference which "points" to the
> collection containing "["a", "b","c"]", and then we
> assign "b", which is a reference to "a", not the
> collection. That can trip people up if they are used
> to doing things like I posted above.
> (I think I have that right, Bret or someone else
> could explain it better.)
Actually B is not a reference to A, but rather a reference to the same collection that A points to. They are both equally valid names for the same thing.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6791&messageID=19748#19748
More information about the Wtr-general
mailing list