Skip to content

Commit 1998a2d

Browse files
committed
Provide second argument to respond_to? to eliminate deprecation warnings
1 parent 3d58d06 commit 1998a2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/octofacts/facts.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def method_missing(name, *args, &block)
8181
return self
8282
end
8383

84-
if facts.respond_to?(name)
84+
if facts.respond_to?(name, false)
8585
if args[0].is_a?(String) || args[0].is_a?(Symbol)
8686
args[0] = string_or_symbolized_key(args[0])
8787
end
@@ -91,11 +91,11 @@ def method_missing(name, *args, &block)
9191
raise NameError, "Unknown method '#{name}' in #{self.class}"
9292
end
9393

94-
def respond_to?(method)
94+
def respond_to?(method, include_all = false)
9595
camelized_name = (method.to_s).split("_").collect(&:capitalize).join
9696
super || Kernel.const_get("Octofacts::Manipulators::#{camelized_name}")
9797
rescue NameError
98-
return facts.respond_to?(method)
98+
return facts.respond_to?(method, include_all)
9999
end
100100

101101
private

0 commit comments

Comments
 (0)