[MacRuby] #864: String#sum(bits), throws an exception when specified bits >= 64.

MacRuby ruby-noreply at macosforge.org
Fri Aug 20 06:01:08 PDT 2010


#864: String#sum(bits), throws an exception when specified bits >= 64.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  minor                 |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 $ cat test_sum.rb
 0.upto(200) {|bits|
   ret = "xyz".sum(bits)

   p "#{bits} : #{ret}"
 }
 }}}

 Result of Ruby 1.9.1:
 {{{
 $ ruby test_sum.rb
 --- snip ---
 "198 : 363"
 "199 : 363"
 "200 : 363"
 }}}

 Result of MacRuby Trunk:
 {{{
 $ macruby test_sum.rb
 --- snip ---
 "61 : 363"
 "62 : 363"
 "63 : 363"
 /Users/watson/src/MacRuby/test_sum.rb:1:in `<main>': bits argument too big
 (ArgumentError)
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/864>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list