Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubymethod_missing and respond_to_missingSingle-choice MCQ

Given a proxy that handles only names starting with `find_`, what does this program print?

class Proxy def method_missing(name, *args) "called #{name}" end def respond_to_missing?(name, include_private = false) name.to_s.start_with?("find_") end end pr = Proxy.new begin puts pr.method(:delete_user) rescue => e puts e.class end