# File lib/ruport/data/table.rb, line 637
    def sort_rows_by(col_names=nil, options={}, &block)
      # stabilizer is needed because of 
      # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/170565
      stabilizer = 0
      
      nil_rows, sortable = partition do |r| 
        Array(col_names).any? { |c| r[c].nil? } 
      end

      data_array =
        if col_names
          sortable.sort_by do |r| 
            stabilizer += 1
            [Array(col_names).map {|col| r[col]}, stabilizer] 
          end
        else
          sortable.sort_by(&block)
        end                 
                                                               
      data_array += nil_rows
      data_array.reverse! if options[:order] == :descending    

      table = self.class.new( :data => data_array, 
                              :column_names => @column_names,
                              :record_class => record_class )

      return table
    end