Details

    • Number of attachments :
      3

      Description

      8)
      Regexps with encoding modifiers supports /n (No encoding) with interpolation ERROR
      RegexpError: /.../n has a non escaped non ASCII character in non ASCII-8BIT script
      /Users/asari/Development/src/jruby/spec/ruby/language/regexp/encoding_spec.rb:89:in `(root)'
      org/jruby/RubyBasicObject.java:1753:in `instance_eval'
      org/jruby/RubyEnumerable.java:1313:in `all?'
      org/jruby/RubyArray.java:1596:in `each'
      /Users/asari/Development/src/jruby/spec/ruby/language/regexp/encoding_spec.rb:4:in `(root)'
      org/jruby/RubyKernel.java:996:in `load'
      /Users/asari/Development/src/jruby/spec/ruby/language/regexp/encoding_spec.rb:56:in `files'
      org/jruby/RubyBasicObject.java:1753:in `instance_eval'
      org/jruby/RubyArray.java:1596:in `each'
      
      9)
      Regexps with encoding modifiers supports /n (No encoding) with interpolation /o ERROR
      RegexpError: /.../n has a non escaped non ASCII character in non ASCII-8BIT script
      /Users/asari/Development/src/jruby/spec/ruby/language/regexp/encoding_spec.rb:93:in `(root)'
      org/jruby/RubyBasicObject.java:1753:in `instance_eval'
      org/jruby/RubyEnumerable.java:1313:in `all?'
      org/jruby/RubyArray.java:1596:in `each'
      /Users/asari/Development/src/jruby/spec/ruby/language/regexp/encoding_spec.rb:4:in `(root)'
      org/jruby/RubyKernel.java:996:in `load'
      /Users/asari/Development/src/jruby/spec/ruby/language/regexp/encoding_spec.rb:56:in `files'
      org/jruby/RubyBasicObject.java:1753:in `instance_eval'
      org/jruby/RubyArray.java:1596:in `each'
      
      1. 0001-Alternative-fix-for-JRUBY-6143.patch
        1.0 kB
        Matt Wilbur
      2. 0001-Fixex-JRUBY-6143.patch
        1 kB
        Matt Wilbur
      3. 0002-Fix-small-whitespace-problem.patch
        0.8 kB
        Matt Wilbur

        Issue Links

          Activity

          Hide
          Hiro Asari added a comment -

          Thank you, Matt.

          I merged your patch to the master: 1cf1d8c

          Show
          Hiro Asari added a comment - Thank you, Matt. I merged your patch to the master: 1cf1d8c
          Hide
          Thomas E Enebo added a comment -

          1cf1d8c1ed069fc3833b9750abd6af7d7d042a83 should be solved differently (please revert). That patch just requires almost every string in 1.8 and 1.9 to be walked once during creation to determine if all characters are more than one byte or not. I am pretty sure this will have a significant impact on string performance.

          Ultimately, anything which wants to work with a string in 1.9 mode should hit logic which recognizes we have not determined coderange yet and then do the costly walk. Ultimately, we a missing some of that logic somewhere (coderange is a brittle icky thing, but we followed MRI's lead on this).

          I really really wish we had nice isolation between 1.8 and 1.9 code paths too

          Show
          Thomas E Enebo added a comment - 1cf1d8c1ed069fc3833b9750abd6af7d7d042a83 should be solved differently (please revert). That patch just requires almost every string in 1.8 and 1.9 to be walked once during creation to determine if all characters are more than one byte or not. I am pretty sure this will have a significant impact on string performance. Ultimately, anything which wants to work with a string in 1.9 mode should hit logic which recognizes we have not determined coderange yet and then do the costly walk. Ultimately, we a missing some of that logic somewhere (coderange is a brittle icky thing, but we followed MRI's lead on this). I really really wish we had nice isolation between 1.8 and 1.9 code paths too
          Hide
          Matt Wilbur added a comment -

          This patch places the code range scan at the latest possible moment to fix this bug.

          Show
          Matt Wilbur added a comment - This patch places the code range scan at the latest possible moment to fix this bug.
          Hide
          Hiro Asari added a comment -

          Tom,

          Can you review Matt's patch from Dec 3? I confirmed that it works as advertised.

          Show
          Hiro Asari added a comment - Tom, Can you review Matt's patch from Dec 3? I confirmed that it works as advertised.
          Hide
          Thomas E Enebo added a comment -

          I fixed this very very very slightly differently last week on master and 1.6 branch. Matt's patch was a great help...Unfortunately, both our patches are not the ideal patch, but it is better to get it working at this point

          Show
          Thomas E Enebo added a comment - I fixed this very very very slightly differently last week on master and 1.6 branch. Matt's patch was a great help...Unfortunately, both our patches are not the ideal patch, but it is better to get it working at this point

            People

            • Assignee:
              Thomas E Enebo
              Reporter:
              Hiro Asari
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: