better metrics

This commit is contained in:
Denis Knauf 2010-03-31 23:22:03 +02:00
parent 2f9586b0f2
commit c1196fb400

View file

@ -31,12 +31,13 @@ module Safebox
end end
def eval *paras, &exe def eval *paras, &exe
ret = self.run( *paras, &exe) type, value = self.run( *paras, &exe)
case ret.first case type
when :exception # Really unsecure. Somebody can create an own exception with own #to_s, #class or #backtrace. when :exception # Really unsecure. Somebody can create an own exception with own #to_s, #class or #backtrace.
on_exception ret.last on_exception value
nil nil
when :value then ret.last when :value then value
else # Not possible
end end
end end
public :eval public :eval