Add flo_prev_or_next func by S-H-GAMELINKS · Pull Request #3769 · ruby/ruby

Add flo_prev_or_next func for merge duplicate code in flo_prev and flo_next .