Ruby 初心者スレッド Part 17
at TECH
255:デフォルトの名無しさん
08/01/25 21:41:18
>>252
こーゆーので我慢する、もしくは(cygwin|windows)を捨てる
def cygpath(opt,path) ; return `cygpath #{opt} #{File.expand_path(path)}` ; end
def winpath(path)
path = File.expand_path(path)
if RUBY_PLATFORM =~ /cygwin/ # ? cygwin 環境と一致する奴
# return `cygpath -w #{path}`
return path.sub(%r!^/cygdrive/(.)/!, '\1:/').sub(%r!^/home/!, 'c:/cygwin/')
end
return path
end
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5373日前に更新/271 KB
担当:undef