[Rubygems-developers] [ rubygems-Bugs-25073 ] method output_query_results in query_command.rb should guarantee some order of platform

noreply at rubyforge.org noreply at rubyforge.org
Wed Apr 1 19:25:04 EDT 2009


Bugs item #25073, was opened at 2009-03-31 20:27
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25073&group_id=126

>Category: `gem` commands (other)
>Group: v1.3.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Jirapong Nanta (jirapong)
>Assigned to: Eric Hodel (drbrain)
Summary: method output_query_results in query_command.rb should guarantee some order of platform 

Initial Comment:
in following line: 

        if non_ruby then
          if platforms.length == 1 then
            title = platforms.values.length == 1 ? 'Platform' : 'Platforms'
            entry << "    #{title}: #{platforms.values.sort.join ', '}\n"
          else
            entry << "    Platforms:\n"
            platforms.each do |version, pls|
              label = "        #{version}: "
              data = format_text pls.sort.join(', '), 68, label.length
              data[0, label.length] = label
              entry << data << "\n"
            end
          end
        end

I think platforms.each should be platforms.sort.each to guarantee sort order.

I found difference in default hash.each between MRI and IronRuby, which this fix should allow RubyGems to work in multiple ruby vm.

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

>Comment By: Eric Hodel (drbrain)
Date: 2009-04-01 16:25

Message:
I don't see why this code doesn't work in multiple implementations, please explain.

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25073&group_id=126


More information about the Rubygems-developers mailing list