summaryrefslogtreecommitdiffhomepage
path: root/mrblib/10error.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-12-12 18:41:18 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-12-12 18:41:18 +0900
commitbbb088234395efda23540d30ab5d1cb40f220d82 (patch)
tree4f66588878264c0d2a17529629d7d183d6a49d29 /mrblib/10error.rb
parentd4ff92bcf65ce140495014f40d22b93a1b1fb957 (diff)
downloadmruby-bbb088234395efda23540d30ab5d1cb40f220d82.tar.gz
mruby-bbb088234395efda23540d30ab5d1cb40f220d82.zip
Modifying frozen objects will raise `FrozenError`.
`FrozenError` is a subclass of `RuntimeError` which used to be raised. [Ruby2.5]
Diffstat (limited to 'mrblib/10error.rb')
-rw-r--r--mrblib/10error.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/mrblib/10error.rb b/mrblib/10error.rb
index 22a8d1ad7..0d9f38d58 100644
--- a/mrblib/10error.rb
+++ b/mrblib/10error.rb
@@ -51,6 +51,9 @@ end
class NotImplementedError < ScriptError
end
+class FrozenError < RuntimeError
+end
+
class StopIteration < IndexError
attr_accessor :result
end