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

Two distinct `binding` objects are captured at two different points within the same method, after a local variable's value has changed in between. How do the two Bindings relate to that variable?

def two_bindings x = 1 b1 = binding x = 2 b2 = binding [b1, b2] end b1, b2 = two_bindings