質問編集履歴

2

見えない状態になっていたのでサポートチームで戻させて頂きました

2015/10/07 00:26

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- ........................ 
1
+ プロセスのカレントディレクトリの絶対パスを取得する書き方について
test CHANGED
@@ -1 +1,15 @@
1
+ どれも同じ結果になると思うのですが、どういう時に使い分けるのでしょうか?
2
+
3
+ 好みでしょうか?
4
+
5
+ ```
6
+
7
+ puts File.expand_path('.')
8
+
9
+ puts File.expand_path('../', __FILE__)
10
+
1
- ..............................................................................................................................
11
+ puts File.expand_path('.', File.dirname(__FILE__))
12
+
13
+ ```
14
+
15
+ ご回答よろしくお願いします。

1

........................ 

2015/10/07 00:26

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- プロセスのカレントディレクトリの絶対パスを取得する書き方について
1
+ ........................ 
test CHANGED
@@ -1,19 +1 @@
1
- どれも同じ結果になると思うのですが、どういう時に使い分けるのでしょうか?
2
-
3
- 好みでしょうか?
4
-
5
-
6
-
7
- ```
8
-
9
- puts File.expand_path('.')
10
-
11
- puts File.expand_path('../', __FILE__)
12
-
13
- puts File.expand_path('.', File.dirname(__FILE__))
1
+ ..............................................................................................................................
14
-
15
- ```
16
-
17
-
18
-
19
- ご回答よろしくお願いします。