Abbrev.abbrev with multi-byte strings returns another result
------------------------------------------------------------

                 Key: JRUBY-5334
                 URL: http://jira.codehaus.org/browse/JRUBY-5334
             Project: JRuby
          Issue Type: Improvement
          Components: Parser, Ruby 1.9
    Affects Versions: JRuby 1.6RC1
         Environment: Linux / Mac OS X (UTF8)
            Reporter: Youhei Kondou
            Assignee: Thomas E Enebo
            Priority: Minor


Abbrev.abbrev with multi-byte strings returns another results between CRuby 
1.9.2 and JRuby1.6.0RC1(1.9 mode)

In CRuby 1.9.2
{code}irb(main):001:0> RUBY_VERSION
=> "1.9.2"
irb(main):002:0> require 'abbrev'
=> true
irb(main):003:0> result = Abbrev.abbrev(%w{あした 
あなた})
=> {"あし"=>"あした", 
"あな"=>"あなた", 
"あした"=>"あした", 
"あなた"=>"あなた"}
irb(main):004:0> puts result.count
4
=> nil{code}

In JRuby1.6.0RC1(1.9 mode)
{code}irb(main):001:0> JRUBY_VERSION
"1.6.0.RC1"
irb(main):002:0> RUBY_VERSION
"1.9.2"
irb(main):003:0> require 'abbrev'
true
irb(main):004:0> result = Abbrev.abbrev(%w{あした 
あなた})
{"\xE3\x81\x82\xE3\x81\x97\xE3\x81\x9F"=>"\xE3\x81\x82\xE3\x81\x97\xE3\x81\x9F",
 "\xE3\x81\x82\xE3\x81\xAA\xE3\x81\x9F"=>"\xE3\x81\x82\xE3\x81\xAA\xE3\x81\x9F"}
irb(main):005:0> puts result.count
2
nil{code}

I guess it's correct with CRuby's behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to