[MacRuby] #856: String#count and #tr are broken, contain escaped '-' or '^' in those arguments.
#856: String#count and #tr are broken, contain escaped '-' or '^' in those arguments. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby $ cat t.rb tmp = "qwerty^\\-" p tmp.size # => 9 p tmp.count("a-z") # => 6 p tmp.count("a\\-z") # => 1 p tmp.count("^y") # => 8 p tmp.count("\\^y") # => 2 p tmp.count("y^\\") # => 3 p "abcdefghijxyz".tr("a\\-z", 'A Z') # => "AbcdefghijxyZ" p "abcdefghijxyz".tr("a\\-z", 'A\\-Z') # => "AbcdefghijxyZ" }}} Result: {{{ $ VM_DISABLE_RBO=true DYLD_LIBRARY_PATH=. ./macruby -I./lib t.rb 9 6 8 8 3 3 "ZZZZZZZZZZZZZ" invalid string transliteration (ArgumentError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/856> MacRuby <http://macruby.org/>
#856: String#count and #tr are broken, contain escaped '-' or '^' in those arguments. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): Indeed, String#tr and friends are not fully implemented yet. It doesn't appear to be critical, though, since these methods aren't used a lot. -- Ticket URL: <http://www.macruby.org/trac/ticket/856#comment:1> MacRuby <http://macruby.org/>
#856: String#count and #tr are broken, contain escaped '-' or '^' in those arguments. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: watson1978@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by watson1978@…): * owner: lsansonetti@… => watson1978@… * milestone: => MacRuby 1.0 -- Ticket URL: <http://www.macruby.org/trac/ticket/856#comment:2> MacRuby <http://macruby.org/>
#856: String#count and #tr are broken, contain escaped '-' or '^' in those arguments. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: watson1978@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): Not sure if this is a bug for 1.0. #tr and #count aren't used very much. -- Ticket URL: <http://www.macruby.org/trac/ticket/856#comment:3> MacRuby <http://macruby.org/>
#856: String#count and #tr are broken, contain escaped '-' or '^' in those arguments. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: watson1978@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by watson1978@…): * milestone: MacRuby 1.0 => MacRuby Later Comment: I see :) This issue's milestone move to later 1.0. -- Ticket URL: <http://www.macruby.org/trac/ticket/856#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby