From: "Elf M. Sternberg" Date: 2005-12-09T03:47:37+09:00 Subject: Re: They say I write Ruby like Perl Patrick Gundlach writes: > [...] > > > > @parent = nil > > > @prevsibling = nil > > > @nextsibling = nil > > > @firstchild = nil > > > @lastchild = nil > > Variables are created when they're first referenced, and are `nil' by > > default, so these lines make no difference. > > mostly right, but here is one exception: > > #!/opt/ruby/1.8/bin/ruby -w > > if @foo==:bar > puts "hello" > end > > gives a warning. So the wording is "Variables are created when they're first assigned", as in Python or Perl? Elf