Skip to content

Commit

Permalink
Merge pull request from GHSA-mp76-7w5v-pr75
Browse files Browse the repository at this point in the history
  • Loading branch information
hopsoft committed Mar 14, 2024
1 parent a81cfc4 commit 88af4fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/turbo_boost/commands/runner.rb
Expand Up @@ -40,7 +40,8 @@ def command_valid?
end

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

0 comments on commit 88af4fc

Please sign in to comment.