lib/active_object/kernel.rb in active_object-5.5.1 vs lib/active_object/kernel.rb in active_object-5.5.2

- old
+ new

@@ -5,19 +5,19 @@ SANITIZE_EVAL_REGEX ||= /\[\d*,?\d*,?\d*\]/ # rubocop:disable Lint/RescueException, Security/Eval def safe_eval + eval(self) + rescue Exception + self + end + + def try_eval val = SANITIZE_EVAL_REGEX.match(to_s).to_s return if val.nil? eval(val) - end - - def try_eval - eval(self) - rescue Exception - self end # rubocop:enable Lint/RescueException, Security/Eval private