Bash Variable Scope In Ruby