mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Kernel.eval to raise NotImplementedError
This commit is contained in:
@@ -12,3 +12,10 @@ class Exception
|
||||
self.new(*args, &block)
|
||||
end
|
||||
end
|
||||
|
||||
# ISO 15.2.37
|
||||
class ScriptError < Exception
|
||||
end
|
||||
|
||||
class NotImplementedError < ScriptError
|
||||
end
|
||||
|
||||
+9
-5
@@ -24,6 +24,11 @@ module Kernel
|
||||
end
|
||||
end
|
||||
|
||||
# 15.3.1.2.3
|
||||
def self.eval(s)
|
||||
raise NotImplementedError.new("eval not implemented")
|
||||
end
|
||||
|
||||
##
|
||||
# Alias for +send+.
|
||||
#
|
||||
@@ -32,11 +37,10 @@ module Kernel
|
||||
### *** TODO *** ###
|
||||
#end
|
||||
|
||||
# 15.3.1.3.18
|
||||
#def instance_eval(string=nil, &block)
|
||||
# ### *** TODO *** ###
|
||||
# raise "Not implemented yet"
|
||||
#end
|
||||
# 15.3.1.3.12
|
||||
def eval(s)
|
||||
Kernel.eval(s)
|
||||
end
|
||||
|
||||
##
|
||||
# Alias for +Kernel.lambda+.
|
||||
|
||||
Reference in New Issue
Block a user