From: Tomoyuki Chikanaga Date: 2011-08-02T17:09:16+09:00 Subject: [ruby-core:38700] [Ruby 1.9 - Bug #4517][Third Party's Issue] ArgumentError when sorting array of objects Issue #4517 has been updated by Tomoyuki Chikanaga. Status changed from Feedback to Third Party's Issue ---------------------------------------- Bug #4517: ArgumentError when sorting array of objects http://redmine.ruby-lang.org/issues/4517 Author: Milo Thurston Status: Third Party's Issue Priority: Normal Assignee: Category: Target version: ruby -v: 1.9.2p180 =begin I've got some Rails (v. 3.0.4) code wherein an array of objects (referred to as 'Thing' here) need to be sorted: stuff = array of Things stuff.sort! {|a,b| a.value <=> b.value } ���where value is a String. On Ruby 1.9.2p136 the array "stuff" is sorted successfully, but running the same code on 1.9.2p180 I get the following error: ArgumentError (comparison of Thing with Thing failed) I can reproduce the error in the console as well as when running the Rails application. Thanks for taking a look. =end -- http://redmine.ruby-lang.org