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
def eval *paras, &exe
ret = self.run( *paras, &exe)
case ret.first
type, value = self.run( *paras, &exe)
case type
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
when :value then ret.last
when :value then value
else # Not possible
end
end
public :eval