Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyBinding objectsSingle-choice MCQ

A `Binding` is captured, then a local is reassigned after capture, and the binding is later read. What does this print?

def make_binding x = 1 b = binding x = 2 b end b = make_binding puts b.local_variable_get(:x) b.eval("z = 7") puts b.local_variables.include?(:z)