refactor while read <<( to __rvm_read_lines, update #2184