What are the differences between these two lines of code?


books.sort! { |firstBook, secondBook| firstBook <=> secondBook }




(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


Let me answer for myself

#They are the same
books.sort! { |first,second| second <=> first } #reverses the array sorting


Someone who just wants to be trivial and curse on the forums doesn't belong here. You deserve many flags, be a civilized human, and quit spamming the forums with useless cursing.


Well you should've just answered my answer beforehand rather than trying to aggravate the situation and breed more resentment! By civilized human, do you mean hypocritical individuals who only want to oust those who you discriminate????