From: Anonymous Date: 2008-08-12T20:20:59+09:00 Subject: [ruby-core:18248] [Ruby 1.9 - Feature #427] (Open) FileTest return values Issue #427 has been reported by Anonymous. ---------------------------------------- Feature #427: FileTest return values http://redmine.ruby-lang.org/issues/show/427 Author: Anonymous Status: Open Priority: Normal Assigned to: Category: core Target version: 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. ---------------------------------------- http://redmine.ruby-lang.org