Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: JRuby 1.0.0RC1, JRuby 1.0.0RC2
    • Fix Version/s: JRuby 2
    • Component/s: Interpreter
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      For code:

      eval "next 1"
      

      Ruby output:

      -e:1: (eval):1: unexpected next (LocalJumpError)
      

      JRuby output:

      Exception in thread "main" org.jruby.exceptions.JumpException
      

        Issue Links

          Activity

          Hide
          Charles Oliver Nutter added a comment -

          Nontrivial, not externally reported. Punting to post 1.0.

          Show
          Charles Oliver Nutter added a comment - Nontrivial, not externally reported. Punting to post 1.0.
          Hide
          Charles Oliver Nutter added a comment -

          Fix for 1.1 along with JRUBY-966.

          Show
          Charles Oliver Nutter added a comment - Fix for 1.1 along with JRUBY-966 .
          Hide
          Charles Oliver Nutter added a comment -

          Punting issues from 1.1 RC2 to 1.1 final.

          Show
          Charles Oliver Nutter added a comment - Punting issues from 1.1 RC2 to 1.1 final.
          Hide
          Charles Oliver Nutter added a comment -

          Still not externally reported and still nontrivial to fix. Post 1.1.

          Show
          Charles Oliver Nutter added a comment - Still not externally reported and still nontrivial to fix. Post 1.1.
          Hide
          Ivo Wever added a comment - - edited

          Behavior in 1.5.6 is different: next, return and retry still have problems (but different problems). break, redo and throw have been fixed.

          jruby -e "eval 'next 1'; puts 'after'"
          => 'after' is not printed. No error or exception; silent exit.

          jruby -e "eval 'return'; puts 'after'"
          => behaves the same as 'next'

          jruby -e "eval 'retry'; puts 'after'"
          => behaves the same as 'next' and 'return'

          jruby -e "eval 'break'"
          => :1: unexpected break (LocalJumpError)

          jruby -e "eval 'redo'"
          :1: unexpected redo (LocalJumpError)

          jruby -e "eval 'throw'; puts 'after'"
          => (eval):1:in `throw': wrong # of arguments(0 for 1) (ArgumentError)

          Show
          Ivo Wever added a comment - - edited Behavior in 1.5.6 is different: next, return and retry still have problems (but different problems). break, redo and throw have been fixed. jruby -e "eval 'next 1'; puts 'after'" => 'after' is not printed. No error or exception; silent exit. jruby -e "eval 'return'; puts 'after'" => behaves the same as 'next' jruby -e "eval 'retry'; puts 'after'" => behaves the same as 'next' and 'return' jruby -e "eval 'break'" => :1: unexpected break (LocalJumpError) jruby -e "eval 'redo'" :1: unexpected redo (LocalJumpError) jruby -e "eval 'throw'; puts 'after'" => (eval):1:in `throw': wrong # of arguments(0 for 1) (ArgumentError)

            People

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

              Dates

              • Created:
                Updated: