class A
def self.new(*, &block)
a = super
a.send(:foo=, "hello")
a
end
attr_accessor :foo
private :foo=
end
a = A.new
p a.foo
a.foo = "Hi"
CmNsYXNzIEEKICBkZWYgc2VsZi5uZXcoKiwgJmJsb2NrKQogICAgYSA9IHN1cGVyCiAgICBhLnNlbmQoOmZvbz0sICJoZWxsbyIpCiAgICBhCiAgZW5kCgogIGF0dHJfYWNjZXNzb3IgOmZvbwogIHByaXZhdGUgOmZvbz0KZW5kCgphID0gQS5uZXcKcCBhLmZvbwphLmZvbyA9ICJIaSI=