Use ruby in place of jruby, it feels more generic.
Mark previous_but_on_dir_to as private.