Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubydup vs cloneSingle-choice MCQ

An object has a singleton method defined directly on it and is also extended with a module. After copying it, which copy responds to those added methods?

module Greeter; def hi; "hi"; end; end o = Object.new o.extend(Greeter) puts o.dup.respond_to?(:hi) puts o.clone.respond_to?(:hi)