Skip to content

Commit

Permalink
Fix Enumerable#compact_blank example in docs
Browse files Browse the repository at this point in the history
Only include one non-blank value

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
  • Loading branch information
johansenja and jonathanhefner committed Dec 15, 2022
1 parent a289f4c commit 0c3c647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/core_ext/enumerable.rb
Expand Up @@ -225,8 +225,8 @@ def pick(*keys)
# [1, "", nil, 2, " ", [], {}, false, true].compact_blank
# # => [1, 2, true]
#
# Set.new([nil, "", 1, 2])
# # => [2, 1] (or [1, 2])
# Set.new([nil, "", 1, false]).compact_blank
# # => [1]
#
# When called on a +Hash+, returns a new +Hash+ without the blank values.
#
Expand Down

0 comments on commit 0c3c647

Please sign in to comment.