Ruby - Blocks, Procs, and Lambdas
Which statement correctly describes the difference between a
Proc and a lambda in Ruby regarding argument checking?Proc and a lambda in Ruby regarding argument checking?Proc in Ruby does not enforce the number of arguments strictly; it allows missing or extra arguments without error.lambda behaves like a method and enforces the exact number of arguments, raising an error if the count is wrong.Proc is lenient with arguments; lambda checks arguments strictly. -> Option D15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions