From: nobu@... Date: 2014-08-28T01:18:45+00:00 Subject: [ruby-dev:48491] [ruby-trunk - Feature #2324] Dir instance methods for relative path Issue #2324 has been updated by Nobuyoshi Nakada. Description updated ---------------------------------------- Feature #2324: Dir instance methods for relative path https://bugs.ruby-lang.org/issues/2324#change-48516 * Author: Nobuyoshi Nakada * Status: Assigned * Priority: Normal * Assignee: Nobuyoshi Nakada * Category: core * Target version: next minor ---------------------------------------- なかだです。 http://www.ipa.go.jp/security/fy20/reports/tech1-tg/2_05.html を みて思い出したんですが、相対パスを使う`Dir`のインスタンスメソッド はどうでしょうか。実装はmvmブランチにあります。 ~~~ $ ./ruby -v -e 'p Dir.open("ext"){|d|d.open("extmk.rb"){|f|f.gets}}' ruby 1.9.1 (2008-12-25 mvm 20976) [i686-linux] "#! /usr/local/bin/ruby\n" $ mkdir tmp $ touch tmp/x tmp/y $ ./ruby -e 'p Dir.open("tmp"){|d|d.unlink("x")}' 0 $ ls tmp/ y ~~~ -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦 -- https://bugs.ruby-lang.org/