Skip to content

Weird error instead of LocalJumpError #1488

Open
@MaxLap

Description

@MaxLap

The following script (when run in a file) has a different behavior in rtuffleRuby vs (both MRI and JRuby)

def bar
  proc { return 42 }
end

begin
  puts bar.call.to_s
rescue LocalJumpError
  puts 'HI'
end

On MRI & JRuby, this will output HI.
On TruffleRuby, I get a weird error that doesn't seem to be a regular exception.

truffleruby: org.graalvm.polyglot.PolyglotException: org.truffleruby.language.control.ReturnException
Original Internal Error: 
org.truffleruby.language.control.ReturnException

truffleruby 1.0.0-rc9, like ruby 2.4.4, GraalVM CE Native [x86_64-linux]
On Ubuntu 16.04, TruffleRuby installed through RVM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions