Project

General

Profile

Actions

Bug #8525

closed

Error? in pathname :: Pathname.new(`pwd`.chomp).basename.realpath

Added by dimytch (Dimitri Peka) over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]
[ruby-core:55483]

Description

[code]
Dir.chdir '/tmp'
p = Pathname.new(pwd.chomp).basename.realpath
Errno::ENOENT: No such file or directory - /tmp/tmp
from (irb):17:in realpath' from (irb):17:in realpath'
from (irb):17
from /usr/bin/irb:12:in `'
[/code]

As I got p must be '/tmp'. Am I wrong?

Actions

Also available in: Atom PDF

Like0
Like0