Ruby/Zmienne globalne: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Szymon wro (dyskusja | edycje)
Nowa strona: A global variable has a name beginning with $. It can be referred to from anywhere in a program. Before initialization, a global variable has the special value nil. ruby> $foo nil r...
 
Kj (dyskusja | edycje)
Nie podano opisu zmian
Linia 38:
 
In the above, $_ and $~ have local scope. Their names suggest they should be global, but they are much more useful this way, and there are historical reasons for using these names.
<noinclude>
{{ProstaNawigacja|spis=Ruby|poprzart=Ruby/Zmienne|poprz=Zmienne|nastart=Ruby/Zmienne instancji|nast=ZMienne instancji}}
</noinclude>