Skip to content

Commit 337cda7

Browse files
authored
Merge pull request from GHSA-mp76-7w5v-pr75
1 parent bf13dc6 commit 337cda7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/turbo_boost/commands/runner.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def command_valid?
3838
end
3939

4040
# validate method
41-
unless command_instance.respond_to?(command_method_name)
41+
ancestors = command_class.ancestors[0..command_class.ancestors.index(TurboBoost::Commands::Command) - 1]
42+
unless ancestors.any? { |a| a.public_instance_methods(false).any? command_method_name.to_sym }
4243
raise TurboBoost::Commands::InvalidMethodError,
4344
"`#{command_class_name}` does not define the public method `#{command_method_name}`!"
4445
end

0 commit comments

Comments
 (0)