add deugging information for failed select when expanding ruby names, update #2517