def sort some_array
some_array.each do |n| # this code seems to be ignored
recursive_sort some_array, 
def recursive_sort unsorted_array, sorted_array
unsorted_array.each do |n|
if n < unsorted_array[n…((unsorted_array).length)]
sorted_array << n
a = [“beaver”, “Cat”]
The program will sort fine, by the uppercase A-Z first, followed by
lowercase a-z, but it seems to be ignoring the capitalization.
Strangely, it does work in irb…
a = [“aa”, “bb”, “cc”]
a.each do |n|
Returns: [“Aa”, “Bb”, “Cc”]
So it works fine in irb, but not from within my method.
I believe it’s in the right place, as the intention is to capitalize!
the array before the recursive_sort takes place. I’ve moved it around
to see if it might work elsewhere in the two defined methods but got
nada. Looked through Google and docs, but oddly everything says it