Ruby 1.8.7, Cygwin and File.expand_path()

Discussion in 'Ruby' started by Erik Veenstra, Jun 2, 2008.

  1. File.expand_path() in Ruby 1.8.7 doesn't work like
    File.expand_path() in Ruby 1.8.6-p114 on Cygwin on Windows XP
    Pro SP 2 (build 2600).

    Bug or feature?...

    gegroet,
    Erik V. - http://www.erikveen.dds.nl/

    ----------------------------------------------------------------

    # Ruby 1.8.6-p114

    $ ruby -v
    ruby 1.8.6 (2008-03-03 patchlevel 114) [i386-cygwin]

    $ ruby -e 'p File.expand_path("a")'
    "/cygdrive/l/a"

    $ ruby -e 'p File.expand_path("a", "b")'
    "/cygdrive/l/b/a"

    ----------------------------------------------------------------

    # Ruby 1.8.7

    $ ruby -v
    ruby 1.8.7 (2008-05-31 patchlevel 0) [i386-cygwin]

    $ ruby -e 'p File.expand_path("a")'
    "" # <--- Wrong

    $ ruby -e 'p File.expand_path("a", "b")'
    Uses 100% CPU # <--- Very Wrong

    ----------------------------------------------------------------
     
    Erik Veenstra, Jun 2, 2008
    #1
    1. Advertising

  2. Hi,

    At Mon, 2 Jun 2008 21:04:36 +0900,
    Erik Veenstra wrote in [ruby-talk:303736]:
    > File.expand_path() in Ruby 1.8.7 doesn't work like
    > File.expand_path() in Ruby 1.8.6-p114 on Cygwin on Windows XP
    > Pro SP 2 (build 2600).
    >
    > Bug or feature?...


    Bug. I think I fixed it in the repository now, thank you.

    --
    Nobu Nakada
     
    Nobuyoshi Nakada, Jun 3, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Davies

    File.expand_path and ~ on windows

    Alan Davies, Sep 18, 2003, in forum: Ruby
    Replies:
    2
    Views:
    151
    Alan Davies
    Sep 22, 2003
  2. John Platte

    File.expand_path(__FILE__)

    John Platte, Apr 29, 2004, in forum: Ruby
    Replies:
    29
    Views:
    390
    Robert Klemme
    May 3, 2004
  3. Fritz Anderson
    Replies:
    3
    Views:
    133
    Robert Dober
    Dec 9, 2008
  4. Roger Pack
    Replies:
    4
    Views:
    112
    Roger Pack
    May 30, 2009
  5. Alpha Blue
    Replies:
    25
    Views:
    285
    Robert Klemme
    Feb 5, 2010
Loading...

Share This Page