Allow RUBIES to contain dir glob strings ("$HOME/.rubies/*") which are expanded as chruby iterates over RUBIES. This would allow chruby to see rubies that were just installed into ~/.rubies/.
Example Code
RUBIES=("/opt/rubies/*" "$HOME/.rubies/*")
for ruby in ${RUBIES[@]}; do
echo "Testing: $ruby"
if [[ -d "$ruby" ]] && [[ "$ruby" == *$1* ]]; then
echo "Found: $ruby"
exit
fi
done