From 481f71e44c806d16de4cc1821096402ceff3cd58 Mon Sep 17 00:00:00 2001 From: Garrison Jensen Date: Fri, 17 May 2024 12:21:10 -0700 Subject: [PATCH] make a public load_factor getter --- lib/sorted_containers/sorted_array.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sorted_containers/sorted_array.rb b/lib/sorted_containers/sorted_array.rb index 1891870..969bc90 100644 --- a/lib/sorted_containers/sorted_array.rb +++ b/lib/sorted_containers/sorted_array.rb @@ -12,7 +12,7 @@ class SortedArray # Sublists are split when they exceed 2 * load_factor DEFAULT_LOAD_FACTOR = 1000 - attr_reader :size + attr_reader :size, :load_factor alias length size # Initializes a new SortedArray object. @@ -1607,7 +1607,7 @@ def include_eql?(value) index ? self[index].eql?(value) : false end - attr_accessor :lists, :maxes, :array_index, :offset, :load_factor + attr_accessor :lists, :maxes, :array_index, :offset attr_writer :size end