Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubymethod_missing dispatch internalsSingle-choice MCQ

What does this proxy built on `BasicObject` print, and why is `BasicObject` the right base for it?

class Proxy < BasicObject def initialize(t); @t = t; end def method_missing(n, *a, &b); @t.__send__(n, *a, &b); end end px = Proxy.new([1, 2, 3]) p px.size