def endless_string_succession(start) while true yield start start = start.succ endendendless_string_succession('fol') do |x| puts x break if x[-1] == x[-2]end# fol# fom# fon# foo