[MacRuby-devel] [MacRuby] #706: YAML output for unicode chars should be the same as Ruby1.9

MacRuby ruby-noreply at macosforge.org
Tue May 11 23:47:14 PDT 2010


#706: YAML output for unicode chars should be the same as Ruby1.9
----------------------------+-----------------------------------------------
 Reporter:  jazzbox@…       |       Owner:  lsansonetti@…        
     Type:  defect          |      Status:  new                  
 Priority:  major           |   Milestone:  MacRuby 0.7          
Component:  MacRuby         |    Keywords:  yaml                 
----------------------------+-----------------------------------------------
 MacRuby‘s to_yaml generates this

 {{{
 $ macruby -r 'yaml' -e 'puts "Rübe".to_yaml'
 --- "R\xFCbe"
 }}}

 while

 {{{
 $ ruby1.9 -r 'yaml' -e 'puts "Rübe".to_yaml'
 --- "R\xC3\xBCbe"
 }}}

 I think that Ruby1.9 is valid because MacRuby 0.7 now supports correct
 encoding of unicode and gives the same result as Ruby1.9:

 {{{
 $ macruby -e 'p "R\xC3\xBCbe"'
 "Rübe"
 $ ruby1.9 -e 'p "R\xC3\xBCbe"'
 "Rübe"
 }}}

 The one-byte string (which worked in 0.6) does not work in 0.7 any longer:

 {{{
 $ macruby -e 'p "R\xFCbe"'
 "R\xFCbe"
 $ macruby_select 0.6 -e 'p "R\xFCbe"'
 "Rübe"
 $ ruby1.9 -e 'p "R\xFCbe"'
 "R\xFCbe"
 }}}

 See also tickets #700 and#339

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



More information about the MacRuby-devel mailing list