Make `LocalJumpError` a subclass of `ScriptError`.

It's incompatible with CRuby, but it is required for mruby because
it cannot detect `break` outside of loops in the parsing time, but
in the code generation time where it cannot raise `SyntaxError`.
parent d0717efd
......@@ -2,8 +2,8 @@
class ArgumentError < StandardError
end
# ISO 15.2.25
class LocalJumpError < StandardError
# ISO 15.2.25 says "LocalJumpError < StandardError"
class LocalJumpError < ScriptError
end
# ISO 15.2.26
......
......@@ -23,7 +23,8 @@
[:Exception, :Object, '15.2.22.2'],
[:StandardError, :Exception, '15.2.23.2'],
[:ArgumentError, :StandardError, '15.2.24.2'],
[:LocalJumpError, :StandardError, '15.2.25.2'],
# [:LocalJumpError, :StandardError, '15.2.25.2'],
[:LocalJumpError, :ScriptError, '15.2.25.2'], # mruby specific
[:RangeError, :StandardError, '12.2.26.2'],
[:RegexpError, :StandardError, '12.2.27.2'],
[:RuntimeError, :StandardError, '12.2.28.2'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment