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 authored Mar 14, 2024
1 parent bf13dc6 commit 337cda7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/turbo_boost/commands/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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 337cda7

Please # to comment.