Kernel.eval to raise NotImplementedError

This commit is contained in:
Yukihiro Matsumoto
2012-06-12 23:39:54 +09:00
parent 8bc506e258
commit a74ab0c2da
2 changed files with 16 additions and 5 deletions
+7
View File
@@ -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
View File
@@ -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+.