Skip to content

Commit

Permalink
Make << and alias for add
Browse files Browse the repository at this point in the history
  • Loading branch information
GarrisonJ committed Apr 29, 2024
1 parent c6dbd17 commit 2530011
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/sorted_containers/sorted_array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,10 @@ def add(value)
end
@size += 1
end
alias << add

# rubocop:enable Metrics/MethodLength

# Alias for add
#
# @param value [Object] The value to add.
def <<(value)
add(value)
end

# Returns a string representation of the sorted array.
#
# @return [String] A string representation of the sorted array.
Expand Down

0 comments on commit 2530011

Please sign in to comment.