From 81e1d3458ed8e74cca795d13368e78d740730241 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Mon, 25 Mar 2024 03:24:54 +0100 Subject: [PATCH] Fix call to Settings.instance.inspect --- lib/active_settings/config.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/active_settings/config.rb b/lib/active_settings/config.rb index 39f3c04..5901085 100644 --- a/lib/active_settings/config.rb +++ b/lib/active_settings/config.rb @@ -47,9 +47,12 @@ def merge!(other) def method_missing(method_name, *args) + return super if method_name == :respond_to_missing? + if ActiveSettings.fail_on_missing && method_name !~ /.*(?==\z)/m raise KeyError, "key not found: #{method_name.inspect}" unless key?(method_name) end + super end @@ -58,5 +61,7 @@ def respond_to_missing?(method_name, include_private = false) key?(method_name) || super end + public :respond_to_missing? + end end