https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2009-01-21T12:21:11Z
Ruby Issue Tracking System
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2691
2009-01-21T12:21:11Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>At Tue, 20 Jan 2009 18:00:00 +0900,<br>
Kazuhiro NISHIYAMA wrote in <a href="/issues/1027">[ruby-core:21454]</a>:</p>
<blockquote>
<p>Portable way of getting home directory is complex see <a href="https://blade.ruby-lang.org/ruby-core/12347">[ruby-core:12347]</a>.<br>
I think a simplest getting home directory is<br>
Dir.chdir { Dir.pwd }<br>
now.<br>
But this is not thread-safe and changes directory needlessness.</p>
</blockquote>
<p>File.expand_path("~") works.</p>
<p>--<br>
Nobu Nakada</p>
<p>=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2704
2009-01-22T01:26:55Z
rue (Eero Saynatkari)
<ul></ul><p>=begin<br>
Excerpts from Nobuyoshi Nakada's message of Wed Jan 21 05:19:23 +0200 2009:</p>
<blockquote>
<p>Hi,</p>
<p>At Tue, 20 Jan 2009 18:00:00 +0900,<br>
Kazuhiro NISHIYAMA wrote in <a href="/issues/1027">[ruby-core:21454]</a>:</p>
<blockquote>
<p>Portable way of getting home directory is complex see <a href="https://blade.ruby-lang.org/ruby-core/12347">[ruby-core:12347]</a>.<br>
I think a simplest getting home directory is<br>
Dir.chdir { Dir.pwd }<br>
now.<br>
But this is not thread-safe and changes directory needlessness.</p>
</blockquote>
<p>File.expand_path("~") works.</p>
</blockquote>
<p>A Dir.home might be more idiomatic considering Windows et al.<br>
(And, of course, <code>File.expand_path ""</code> does not expand to the<br>
home directory in 1.8.6 at least, which may or may not be<br>
expected.)</p>
<p>--<br>
Magic is insufficiently advanced technology.</p>
<p>=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2705
2009-01-22T01:31:54Z
luislavena (Luis Lavena)
luislavena@gmail.com
<ul></ul><p>=begin<br>
On Wed, Jan 21, 2009 at 2:25 PM, Eero Saynatkari <a href="mailto:ruby-ml@kittensoft.org" class="email">ruby-ml@kittensoft.org</a> wrote:</p>
<blockquote>
<p>Excerpts from Nobuyoshi Nakada's message of Wed Jan 21 05:19:23 +0200 2009:</p>
<blockquote>
<p>Hi,</p>
<p>At Tue, 20 Jan 2009 18:00:00 +0900,<br>
Kazuhiro NISHIYAMA wrote in <a href="/issues/1027">[ruby-core:21454]</a>:</p>
<blockquote>
<p>Portable way of getting home directory is complex see <a href="https://blade.ruby-lang.org/ruby-core/12347">[ruby-core:12347]</a>.<br>
I think a simplest getting home directory is<br>
Dir.chdir { Dir.pwd }<br>
now.<br>
But this is not thread-safe and changes directory needlessness.</p>
</blockquote>
<p>File.expand_path("~") works.</p>
</blockquote>
<p>A Dir.home might be more idiomatic considering Windows et al.<br>
(And, of course, <code>File.expand_path ""</code> does not expand to the<br>
home directory in 1.8.6 at least, which may or may not be<br>
expected.)</p>
</blockquote>
<p>The changes File.expand_path("~") has not been backported to 1.8.6,<br>
and I believe they will not be.</p>
<p>For that purpose, I always set HOME=%HOMEDRIVE%%HOMEPATH%</p>
<p>Agree on the idiomatic / Ruby style for Dir.home, that will be a nice addition.</p>
<h2>--<br>
Luis Lavena<br>
AREA 17</h2>
<p>Perfection in design is achieved not when there is nothing more to add,<br>
but rather when there is nothing more to take away.<br>
Antoine de Saint-Exupéry</p>
<p>=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2711
2009-01-22T11:15:04Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>At Thu, 22 Jan 2009 01:30:00 +0900,<br>
Luis Lavena wrote in <a href="https://blade.ruby-lang.org/ruby-core/21491">[ruby-core:21491]</a>:</p>
<blockquote>
<p>The changes File.expand_path("~") has not been backported to 1.8.6,<br>
and I believe they will not be.</p>
</blockquote>
<p>What change? Using %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% or the<br>
personal folder patch has been backported at p127, in Jun 2008.</p>
<p>--<br>
Nobu Nakada</p>
<p>=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2712
2009-01-22T11:16:27Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>At Thu, 22 Jan 2009 01:25:05 +0900,<br>
Eero Saynatkari wrote in <a href="https://blade.ruby-lang.org/ruby-core/21490">[ruby-core:21490]</a>:</p>
<blockquote>
<p>(And, of course, <code>File.expand_path ""</code> does not expand to the<br>
home directory in 1.8.6 at least, which may or may not be<br>
expected.)</p>
</blockquote>
<p>It is not expected definitely. It should be the current<br>
working directory.</p>
<p>--<br>
Nobu Nakada</p>
<p>=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2727
2009-01-23T21:55:29Z
znz (Kazuhiro NISHIYAMA)
<ul></ul><p>=begin<br>
At Thu, 22 Jan 2009 23:26:40 +0900,<br>
C.E. Thornton wrote:</p>
<blockquote>
<p>Dir.chdir(File.expand_path("~")) works on linux/unix<br>
systems. Does that concept of a "home" Directory translate<br>
to other OS's?</p>
</blockquote>
<p>If Dir.chdir without arguments works,<br>
Dir.home can return the directory.<br>
Otherwise Dir.home will raise exception or return nil,<br>
I think.</p>
<p>=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2888
2009-02-02T12:44:04Z
ko1 (Koichi Sasada)
<ul><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li></ul><p>=begin</p>
<p>=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2917
2009-02-02T16:37:06Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>=begin<br>
Applied in changeset r21953.<br>
=end</p>
Ruby master - Feature #1027: Dir.home
https://bugs.ruby-lang.org/issues/1027?journal_id=2928
2009-02-02T23:16:22Z
rogerdpack (Roger Pack)
rogerpack2005@gmail.com
<ul></ul><p>=begin<br>
Thanks for doing that Nobu.<br>
-=r<br>
=end</p>