better metrics
This commit is contained in:
parent
2f9586b0f2
commit
c1196fb400
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue