Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.2
    • Fix Version/s: JRuby 1.7.0.pre1
    • Component/s: Core Classes/Modules
    • Labels:
      None
    • Environment:
      Vista, JDK6u10, JRuby 1.2, Netbeans 6.5.1
    • Number of attachments :
      0

      Description

      Simple example from tutorials:

      Its work fine

      a = "ABCD"
      a = a
      a[0] = 'Z'
      puts a
      puts a.size

      Stdout:
      ZBCD
      4

      But, this:

      a = "Даша"
      a[0] = "М"
      puts a
      puts a.size

      Stdout:
      М�аша
      9

      9, but must be 8, and non printable character was added after first char

        Activity

        Hide
        Hiro Asari added a comment -

        On master, the result matches that of MRI.

        irb(main):002:0> a = "”аша"
        => "”аша"
        irb(main):003:0> a[0] = "М" 
        => "М"
        irb(main):004:0> puts a
        Маша
        => nil
        irb(main):005:0> puts a.size
        4
        => nil
        
        Show
        Hiro Asari added a comment - On master, the result matches that of MRI. irb(main):002:0> a = "”аша" => "”аша" irb(main):003:0> a[0] = "М" => "М" irb(main):004:0> puts a Маша => nil irb(main):005:0> puts a.size 4 => nil

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Mejov Andrei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: