Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubysend and public_sendSingle-choice MCQ

What is the difference in behavior between `send` and `public_send` when invoking a method?

class Bank private def check; 100; end end Bank.new.send(:check) # => 100 Bank.new.public_send(:check) # raises NoMethodError