Bugs item #4985, was opened at 2006-07-08 16:03
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4985&group_id=426

Category: Standard Library
Group: 1.8.4
Status: Open
Resolution: None
Priority: 3
Submitted By: Eric Rehnke (erehnke)
Assigned to: Nobody (None)
Summary: array.sort gives an error when the array contains a nil

Initial Comment:

>> friends = ["Melissa", "Fred"]
=> ["Melissa", "Fred"]
>> friends[4] = "John"
=> "John"
>> friends
=> ["Melissa", "Fred", nil, nil, "John"]
>> friends.sort
ArgumentError: comparison of String with nil failed
        from (irb):5:in `sort'
        from (irb):5
>>

ruby 1.8.4 (2005-12-24) (i386-mswin32)

Microsoft Windows XP Professional
Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519 : Service Pack 2)



----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4985&group_id=426