HOMELv027 File.dirname(“/a/b/c.txt”) の結果はどれか。 2026年1月24日 dirnameはディレクトリ部分のパスを返す File.expand_path(“~”) の結果は何か。 File.basename(“/a/b/c.txt”, “.txt”) の結果はどれか。