rtilley wrote:

> When writing methods as functions (I know they're methods pretending to
> be functions) do you still need to use globals... like this:
> 
> $global_var
> def some_other_function
>     ...
>     $global_var
> end
> 
> Or, is it OK to use them like this:
> 
> global_var
> def some_other_function
>     ...
>     global_var
> end

No, you still need to use either global or instance variable syntax, since
it is, as you correctly state, still a class.

def some_other_function
    @n = 1
    $m = 2
end
def some_other_function2
    puts @n
    puts $m
end

some_other_function
some_other_function2