Project

General

Profile

Actions

Bug #20056

closed

Dir#chdir inconsistency with Dir.chdir

Added by zverok (Victor Shepelev) 12 months ago. Updated 12 months ago.

Status:
Closed
Target version:
-
[ruby-core:115682]

Description

I am not sure it is important; I just wanted to understand if this is intentional or accidental.

  1. There is no block form for Dir#chdir, unlike Dir.chdir (the form that will return to the previous directory when the block is finished)
  2. Dir.chdir returns 0, while Dir#chdir returns nil (both seem to be not representing any particular internal value, just a hardcoded return value).
Actions

Also available in: Atom PDF

Like1
Like1Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0