Project

General

Profile

Actions

Feature #6937

closed

File.absolute_path(…) has behavior that is inconsistent with File.expand_path(…).

Added by robertgleeson (Robert Gleeson) about 12 years ago. Updated about 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:47320]

Description

Hey,

While hacking on Rubinius I noticed that File.absolute_path does not expand "~" or "~user" to their respective
home directory. I think this behavior is quite odd and unexpected. I shared my sentiment on the #rubinius
IRC channel and I got directed here. So, what do you say, could File.absolute_path inherit the behavior of
File.expand_path in this regard?

Updated by nobu (Nobuyoshi Nakada) about 12 years ago

  • Status changed from Open to Rejected

File.absolute_path has introduced not to expand them.
Why do you need to make File.absolute_path an alias of File.expand_path?

Updated by robertgleeson (Robert Gleeson) about 12 years ago

@nobu (Nobuyoshi Nakada) Thanks for your reply. I just found the behavior odd and unexpected.
I thought it'd make more sense to have the same behavior as File.expand_path(…)
when it comes to expanding "~".

Actions

Also available in: Atom PDF

Like0
Like0Like0