Project

General

Profile

Actions

Feature #427

closed

FileTest return values

Added by Anonymous over 16 years ago. Updated over 13 years ago.

Status:
Rejected
Target version:
-
[ruby-core:18248]

Description

=begin
It would be more convenient if FileTest.directory? and FileTest.file? and perhaps some other FileTest methods returned the receiver if true, rather than just true value. That would allow the test to be used with assignments. E.g.

dir = FileTest.directory?('/home')

instead of

dir = '/home' if FileTest.directory?('/home')

The change is backward compatible. However, it would effect Pathname, which may need to be adjusted to take this into account properly.
=end

Actions #1

Updated by ko1 (Koichi Sasada) over 16 years ago

  • Assignee set to matz (Yukihiro Matsumoto)

=begin

=end

Actions #2

Updated by matz (Yukihiro Matsumoto) over 16 years ago

  • Status changed from Open to Rejected

=begin
this is short, but unintuitive, I think.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0