Ruby 初心者スレッド Part 17 at TECH
[2ch|▼Menu]
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