From d309737928cb52deb2bfc2d2342a73d203a68fbd Mon Sep 17 00:00:00 2001 From: Takumasa Ochi Date: Thu, 6 Sep 2018 02:07:11 +0900 Subject: Improve API document on Object#blank? * Introduce `falsey` to represent both `nil` and `false`. * Keep consistent order between abstract description and examples. --- activesupport/lib/active_support/core_ext/object/blank.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index ad6a9c6146..027c824b24 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -3,8 +3,8 @@ require "concurrent/map" class Object - # An object is blank if it's false, empty, or a whitespace string. - # For example, +false+, '', ' ', +nil+, [], and {} are all blank. + # An object is blank if it's falsey, empty, or a whitespace string. + # For example, +nil+, +false+, [], {}, '', and ' ' are all blank. # # This simplifies # -- cgit v1.2.3 From 2a82c4750116568ae65cdd71f966b359fc1c07fc Mon Sep 17 00:00:00 2001 From: Takumasa Ochi <4468155+aeroastro@users.noreply.github.com> Date: Fri, 14 Sep 2018 02:41:46 +0900 Subject: Revert falsey with example reordered --- activesupport/lib/active_support/core_ext/object/blank.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index 027c824b24..f36fef6cc9 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -3,8 +3,8 @@ require "concurrent/map" class Object - # An object is blank if it's falsey, empty, or a whitespace string. - # For example, +nil+, +false+, [], {}, '', and ' ' are all blank. + # An object is blank if it's false, empty, or a whitespace string. + # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. # # This simplifies # -- cgit v1.2.3