remove dupliation in try_to_read_ruby, update #2659