class Foo def memberwiseClone as Object is protected obj = base.memberwiseClone return obj def main is shared f1 = Foo() f2 = f1.memberwiseClone assert f1 is not f2