Are there better ways to prevent ‘yield’ when no block is passed in? August 22, 2023 by Tarik Yes! 🙂 def a_method(*params) # ... yield if block_given? # ... end