#192: String#length and String#size do not work correctly ----------------------------------------+----------------------------------- Reporter: vincent.isamb...@… | Owner: lsansone...@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- String#length and String#size return the byte size instead of the number of characters in the string. {{{ # coding: utf-8 p 'あ'.length p 'あ'.size p 'あ'.bytesize }}}
Ruby 1.9: {{{ 1 1 3 }}} MacRuby: {{{ 3 3 3 }}} For #size, the function is declared normally in string.c but for #length, you have to remove it from opt_length in insns.def. -- Ticket URL: <http://www.macruby.org/trac/ticket/192> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel