fix rbenv module UnboundLocalError
Backport #14428 to 2014.7