Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: JRuby 1.3, JRuby 1.7.0.RC1
    • Fix Version/s: None
    • Component/s: Core Classes/Modules
    • Labels:
      None
    • Environment:
      Kubuntu linux
    • Number of attachments :
      0

      Description

      Having a "special" character on a line (such as £ ¤ §) causes Jirb to terminate immediately with exit code 0 (checked from bash with echo $?)

      Having the same character on a single line i a script file run with "jruby", instead gives a syntax error:
      :1: /home/larsw/tmp/jirbbug.rb:1: Invalid char `\243' ('£') in expression (SyntaxError)

        Activity

        Hide
        Hiro Asari added a comment -

        For what it's worth, this also happens with ruby 1.9.x. 1.8.x irb doesn't accept these characters as input.

        Show
        Hiro Asari added a comment - For what it's worth, this also happens with ruby 1.9.x. 1.8.x irb doesn't accept these characters as input.
        Hide
        Hiro Asari added a comment -

        Correction. This is OK if you compile MRI with GNU readline support.

        I believe this is an issue with jline.

        Show
        Hiro Asari added a comment - Correction. This is OK if you compile MRI with GNU readline support. I believe this is an issue with jline.
        Hide
        Charles Oliver Nutter added a comment -

        Still appears to be a problem with jline 1.0-snapshot, but 1.9 mode at least presents an error:

        ~/projects/jruby ➔ jirb
        >> 
        
        ~/projects/jruby ➔ jruby --1.9 -S jirb
        >> 
        NameError: undefined local variable or method `?' for main:Object
        	from (irb):1:in `evaluate'
        	from org/jruby/RubyKernel.java:1087:in `eval'
        	from org/jruby/RubyKernel.java:1412:in `loop'
        	from org/jruby/RubyKernel.java:1199:in `catch'
        	from org/jruby/RubyKernel.java:1199:in `catch'
        	from /Users/headius/projects/jruby/bin/jirb:13:in `(root)'
        >> quit
        
        

        My guess would be that encodings are getting mucked up passing through jline, and only the 1.9 parser is able to cope with it. Note that the resulting character is "?", the default replacement character for anything that can't be decoded into UTF-16.

        Show
        Charles Oliver Nutter added a comment - Still appears to be a problem with jline 1.0-snapshot, but 1.9 mode at least presents an error: ~/projects/jruby ➔ jirb >> ~/projects/jruby ➔ jruby --1.9 -S jirb >> NameError: undefined local variable or method `?' for main:Object from (irb):1:in `evaluate' from org/jruby/RubyKernel.java:1087:in `eval' from org/jruby/RubyKernel.java:1412:in `loop' from org/jruby/RubyKernel.java:1199:in `catch' from org/jruby/RubyKernel.java:1199:in `catch' from /Users/headius/projects/jruby/bin/jirb:13:in `(root)' >> quit My guess would be that encodings are getting mucked up passing through jline, and only the 1.9 parser is able to cope with it. Note that the resulting character is "?", the default replacement character for anything that can't be decoded into UTF-16.
        Hide
        Charles Oliver Nutter added a comment -

        Looking at this on JRuby 1.7...

        The issue remains, and I've confirmed that it fails with or without readline loaded. So this is some console or IRB-specific encoding problem, not related to jline.

        Updating version info.

        Show
        Charles Oliver Nutter added a comment - Looking at this on JRuby 1.7... The issue remains, and I've confirmed that it fails with or without readline loaded. So this is some console or IRB-specific encoding problem, not related to jline. Updating version info.
        Hide
        Charles Oliver Nutter added a comment -

        Still a problem even with all recent fixes. On master, the error is presented in 1.9 mode but the character is mangled. In 1.8 mode, it terminates.

        This is likely a combined problem with MRI's parser for IRB (which is not the real parser) and our readline implementation; one is kicking the other out.

        Given that most folks aren't running 1.8 mode anymore and we're dropping it in JRuby 9k, I'm going to mark this Won't Fix.

        Show
        Charles Oliver Nutter added a comment - Still a problem even with all recent fixes. On master, the error is presented in 1.9 mode but the character is mangled. In 1.8 mode, it terminates. This is likely a combined problem with MRI's parser for IRB (which is not the real parser) and our readline implementation; one is kicking the other out. Given that most folks aren't running 1.8 mode anymore and we're dropping it in JRuby 9k, I'm going to mark this Won't Fix.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Lars Westergren
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: