[ruby-talk:00351] local variables

From: Pros Yeboah <yeboah@...>
Date: 1999-05-27 07:12:37 UTC
List: ruby-talk #351
Can someone  please explain it ,why I get this:
ruby -e'i=3;def foo;p defined?(i);end;foo'  #==>nil
ruby -e'i=3;1.times{p defined?(i)}             #==>"local-variable"

Thanks
Pros

In This Thread

Prev Next