From: akr@... Date: 2016-11-05T09:13:55+00:00 Subject: [ruby-core:77963] [Ruby trunk Feature#12596][Closed] Add Pathname#empty? to be consistent with Dir.empty? and File.empty? Issue #12596 has been updated by Akira Tanaka. Status changed from Open to Closed implemented at r56571 ---------------------------------------- Feature #12596: Add Pathname#empty? to be consistent with Dir.empty? and File.empty? https://bugs.ruby-lang.org/issues/12596#change-61293 * Author: John Backus * Status: Closed * Priority: Normal * Assignee: Akira Tanaka ---------------------------------------- #9969 and #10121 introduced `Dir.empty?` and `File.empty?`. It would be very useful if `Pathname` had an instance method for performing these same checks. Since `Pathname` already has several methods which work for both files and directories (for example, `Pathname#exist?`) I propose adding `Pathname#empty?` which would work for expose the behavior that `File.empty?` and `Dir.empty?` provide. I think this change especially makes sense given that, just like `File.empty?` was added as an alias of `File.zero?`, it seems like `Pathname#zero?` should also benefit from the same naming improvement provided by this alias. -- https://bugs.ruby-lang.org/ Unsubscribe: