Forum: Ruby-dev Dir instance methods for relative path

Posted by yhara (Yutaka HARA) (Guest)
on 2012-10-25 14:55
(Received via mailing list)
Issue #2324 has been updated by yhara (Yutaka HARA).

Target version changed from 2.0.0 to next minor


----------------------------------------
Feature #2324: Dir instance methods for relative path
https://bugs.ruby-lang.org/issues/2324#change-31570

Author: nobu (Nobuyoshi Nakada)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: next minor


=begin
 なかだです。

 http://www.ipa.go.jp/security/fy20/reports/tech1-t... を
 みて思い出したんですが、相対パスを使う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はできる。
     中田 伸悦
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.