Project

General

Profile

Feature #9969

Add File.empty? as alias to File.zero?

Added by Robert A. Heiler almost 2 years ago. Updated 21 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:63269]

Description

Could we alias File.empty? to File.zero? ?

The latter already exists. I tried to use File.empty?
and then thought it would not exist, but the code
already exists, it is just called File.zero? instead.

Associated revisions

Revision 54559
Added by Nobuyoshi Nakada 21 days ago

file.c: File.empty?

  • file.c (Init_File): add alias File.empty? to File.zero?. [Feature #9969]

Revision 54560
Added by Nobuyoshi Nakada 21 days ago

NEWS: [Feature #9969]

History

#1 [ruby-core:63451] Updated by Zachary Scott almost 2 years ago

  • Tracker changed from Bug to Feature
  • Priority changed from 3 to Normal
  • Target version set to current: 2.2.0

#2 [ruby-core:73867] Updated by Lucas Buchala 3 months ago

I added a comment on issue #10121 before knowing this specific issue already existed.

I just wanted to say that, with the arrival of Dir.empty?, I like the idea of the File.empty? alias for the reason of having some symmetry between Dir and File methods.

#3 [ruby-core:74919] Updated by Yukihiro Matsumoto 21 days ago

OK, agreed.

Matz.

#4 Updated by Nobuyoshi Nakada 21 days ago

  • Status changed from Open to Closed

Applied in changeset r54559.


file.c: File.empty?

  • file.c (Init_File): add alias File.empty? to File.zero?. [Feature #9969]

Also available in: Atom PDF