前の日 / 次の日 / 最新 / 2004-01
pathname を使って次のように.
require 'pathname' path = Pathname.new("/home/fumi/test.txt") from = Pathname.new("/home/fumi/test/1") relative_path = path.relative_path_from(from) => #<Pathname:../../test.txt>