Ruby/Reflection/global variables

Материал из Wiki.crossplatform.ru

Версия от 17:57, 13 сентября 2010; ViGOur (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Kernel"s method global_variables returns all the global variables, including $ship.

$ship = "P"
@friend_1 = "M"
@friend_2 = "J"
bad_chap = "G"
p global_variables