[MacRuby-devel] [MacRuby] #345: Ordering enumerations on set and hash

MacRuby ruby-noreply at macosforge.org
Thu Feb 11 01:29:15 PST 2010


#345: Ordering enumerations on set and hash
---------------------------------+------------------------------------------
 Reporter:  fisksvett@…          |        Owner:  lsansonetti@…        
     Type:  enhancement          |       Status:  closed               
 Priority:  minor                |    Milestone:  MacRuby 0.6          
Component:  MacRuby              |   Resolution:  fixed                
 Keywords:  set hash             |  
---------------------------------+------------------------------------------
Changes (by lsansonetti@…):

  * status:  new => closed
  * resolution:  => fixed
  * milestone:  MacRuby 0.5 => MacRuby 0.6


Comment:

 This should be fixed in trunk with the new Hash class.

 {{{
 $ ./miniruby -e "h={}; 100.times { |i| h[i]=42 }; p h"
 {0=>42, 1=>42, 2=>42, 3=>42, 4=>42, 5=>42, 6=>42, 7=>42, 8=>42, 9=>42,
 10=>42, 11=>42, 12=>42, 13=>42, 14=>42, 15=>42, 16=>42, 17=>42, 18=>42,
 19=>42, 20=>42, 21=>42, 22=>42, 23=>42, 24=>42, 25=>42, 26=>42, 27=>42,
 28=>42, 29=>42, 30=>42, 31=>42, 32=>42, 33=>42, 34=>42, 35=>42, 36=>42,
 37=>42, 38=>42, 39=>42, 40=>42, 41=>42, 42=>42, 43=>42, 44=>42, 45=>42,
 46=>42, 47=>42, 48=>42, 49=>42, 50=>42, 51=>42, 52=>42, 53=>42, 54=>42,
 55=>42, 56=>42, 57=>42, 58=>42, 59=>42, 60=>42, 61=>42, 62=>42, 63=>42,
 64=>42, 65=>42, 66=>42, 67=>42, 68=>42, 69=>42, 70=>42, 71=>42, 72=>42,
 73=>42, 74=>42, 75=>42, 76=>42, 77=>42, 78=>42, 79=>42, 80=>42, 81=>42,
 82=>42, 83=>42, 84=>42, 85=>42, 86=>42, 87=>42, 88=>42, 89=>42, 90=>42,
 91=>42, 92=>42, 93=>42, 94=>42, 95=>42, 96=>42, 97=>42, 98=>42, 99=>42}
 $ ./miniruby -I./lib -r set -e "h=Set.new; 100.times { |i| h<<i }; p h"
 #<Set: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
 91, 92, 93, 94, 95, 96, 97, 98, 99}>
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/345#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list