Kernel's method global_variables returns all the global variables, including $ship. : global_variables « Reflection « Ruby






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

 








Related examples in the same category