Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyblocks procs lambdas bindingSingle-choice MCQ

What does this print, and what does it reveal about how `define_method` captures variables?

class Foo x = 10 define_method(:bar) { x } end x = 999 p Foo.new.bar