[MacRuby] #865: String#lines(separator) is broken when specified separator == "".

MacRuby ruby-noreply at macosforge.org
Fri Aug 20 06:16:09 PDT 2010


#865: String#lines(separator) is broken when specified separator == "".
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  minor                 |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 $ cat test_lines.rb
 p "hello\n\n\nworld".lines().to_a
 p "hello\n\n\nworld".lines('\n').to_a
 p "hello\n\n\nworld".lines('').to_a
 }}}

 Result of Ruby 1.9.1:
 {{{
 $ ruby test_lines.rb
 ["hello\n", "\n", "\n", "world"]
 ["hello\n\n\nworld"]
 ["hello\n\n\n", "world"]
 }}}

 Result of MacRuby Trunk:
 {{{
 $ macruby test_lines.rb
 ["hello\n", "\n", "\n", "world"]
 ["hello\n\n\nworld"]
 ["hello\n", "\n", "\n", "world"]
 }}}

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



More information about the macruby-tickets mailing list