On Jan 19, 2012, at 10:39 AM, Loren wrote: > Would you be please so kind to take a look at my code and tell me what > am I doing wrong?
You're making this far, far, far more complicated than it needs to be. Hint 1: you only need two arrays, sorted & unsorted, all the shuffling in & out of temporary arrays is unnecessary and just complicates your code--this is by far most important. Hint 2: use the appropriate functions on enumerable (parent class of array) with blocks to get rid of the loops--maybe your book hasn't gotten to this yet, if so don't worry about it, but it's those functions that let you express the sorting part in about 10 lines or so of code. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.