Permalink
Browse files

Kernel.eval to raise NotImplementedError

  • Loading branch information...
1 parent 8bc506e commit a74ab0c2daf1855b968ef8498b9161eadb04a386 @matz matz committed Jun 12, 2012
Showing with 16 additions and 5 deletions.
  1. +7 −0 mrblib/error.rb
  2. +9 −5 mrblib/kernel.rb
View
@@ -12,3 +12,10 @@ def self.exception(*args, &block)
self.new(*args, &block)
end
end
+
+# ISO 15.2.37
+class ScriptError < Exception
+end
+
+class NotImplementedError < ScriptError
+end
View
@@ -24,6 +24,11 @@ def self.loop #(&block)
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 @@ def self.loop #(&block)
### *** 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+.

0 comments on commit a74ab0c

Please sign in to comment.