Require_relative / require in sonic pi

Hi
I too am new to Sonic Pi and Ruby, but certainly not a seasoned programmer. I can say that require does work in Sonic Pi, but cannot say if it is officially supported - require does not appear under Help/Lang. This thread is where I found out how to download and ‘install’ Ziffers, for example:

Then I just run

require "~/ziffers/ziffers.rb"

zplay "e 0 2 1 3 2 4 35"

and it works fine. Sadly I cannot answer your second more specific question re variables scope.
HTH

PD-Pi