JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-5961

RegexpError ((RegexpError) invalid multibyte escape in --1.9 mode

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: JRuby 1.6.4
    • Component/s: None
    • Labels:
      None
    • Environment:
    • Number of attachments :
      0

      Description

      Creating a rails application will yeild this error

      snow:tmp lribeiro$ jruby -S rails new test1
      RegexpError: (RegexpError) invalid multibyte escape: /(?:;(?-mix:[\r\n\t ]+)?(?-mix:[^\x00- ()<>@,;:\\"\/\[\]?={}\x7f]+)(?-mix:[\r\n\t ]+)?=(?-mix:[\r\n\t ]+)?(?:(?-mix:[^\x00- ()<>@,;:\\"\/\[\]?={}\x7f]+)|(?-mix:"(?:[\r\n\t !#-\[\]-~\x80-\xff]|\\[\x00-\x7f])*"))(?-mix:[\r\n\t ]+)?)*/
           Meta at /Users/lribeiro/Work/github/jruby/lib/ruby/1.9/open-uri.rb:458
        OpenURI at /Users/lribeiro/Work/github/jruby/lib/ruby/1.9/open-uri.rb:394
         (root) at /Users/lribeiro/Work/github/jruby/lib/ruby/1.9/open-uri.rb:94
        require at org/jruby/RubyKernel.java:1034
        require at /Users/lribeiro/Work/github/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29
         (root) at /Users/lribeiro/Work/github/jruby/lib/ruby/1.9/open-uri.rb:1
        require at org/jruby/RubyKernel.java:1034
        require at /Users/lribeiro/Work/github/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29
         (root) at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/generators/actions.rb:10
        require at org/jruby/RubyKernel.java:1034
        require at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/generators/base.rb:29
         (root) at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/generators.rb:12
        require at org/jruby/RubyKernel.java:1034
        require at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/generators.rb:29
         (root) at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands/application.rb:15
        require at org/jruby/RubyKernel.java:1034
        require at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands/application.rb:29
         (root) at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/cli.rb:14
        require at org/jruby/RubyKernel.java:1034
        require at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/cli.rb:29
         (root) at /Users/lribeiro/Work/github/jruby/lib/ruby/gems/1.8/gems/rails-3.0.9/bin/rails:4
           load at org/jruby/RubyKernel.java:1060
         (root) at /Users/lribeiro/Work/github/jruby/bin/rails:19
      
      

        Issue Links

          Activity

          Hide
          Peter Weldon added a comment -
          test_re.rb
          x = /\x80/n
          y = /#{x}/n
          p y
          
          $ ruby -v test_re.rb
          ruby 1.9.3dev (2011-07-02 trunk 32367) [i386-mingw32]
          /(?-mix:\x80)/n
          
          $ jruby -v test_re.rb
          jruby 1.7.0.dev (ruby-1.9.2-p136) (2011-08-07 dd6e865) (Java HotSpot(TM) Server VM 1.7.0) [Windows 7-x86-java]
          RegexpError: (RegexpError) invalid multibyte escape: /(?-mix:\x80)/
            (root) at test_re.rb:2
          Show
          Peter Weldon added a comment - test_re.rb x = /\x80/n y = /#{x}/n p y $ ruby -v test_re.rb ruby 1.9.3dev (2011-07-02 trunk 32367) [i386-mingw32] /(?-mix:\x80)/n $ jruby -v test_re.rb jruby 1.7.0.dev (ruby-1.9.2-p136) (2011-08-07 dd6e865) (Java HotSpot(TM) Server VM 1.7.0) [Windows 7-x86-java] RegexpError: (RegexpError) invalid multibyte escape: /(?-mix:\x80)/ (root) at test_re.rb:2
          Hide
          Paul Cowan added a comment -

          I get this error on the jruby_16 branch when running the attached GemFile in JRUBY-6004(https://jira.codehaus.org/browse/JRUBY-6004)

          Show
          Paul Cowan added a comment - I get this error on the jruby_16 branch when running the attached GemFile in JRUBY-6004 ( https://jira.codehaus.org/browse/JRUBY-6004 )
          Hide
          Charles Oliver Nutter added a comment - - edited

          Looks like this was fixed by other patches. We had similar problems just running a new Rails app, and patched that toward the very end of 1.6.4 cycle.

          The Gemfile provided in JRUBY-6004 now bundles just fine.

          Show
          Charles Oliver Nutter added a comment - - edited Looks like this was fixed by other patches. We had similar problems just running a new Rails app, and patched that toward the very end of 1.6.4 cycle. The Gemfile provided in JRUBY-6004 now bundles just fine.

            People

            • Assignee:
              Charles Oliver Nutter
              Reporter:
              Luís Landeiro Ribeiro
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: