Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubydefine_methodSingle-choice MCQ

When define_method is called inside a private section of a class, what is the visibility of the resulting method in Ruby 3.3?

class G private define_method(:secret) { "s" } end G.new.secret