Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyStruct and DataSingle-choice MCQ

What does this Data class definition produce for the `with` call and the original object?

Point = Data.define(:x, :y) p1 = Point.new(1, 2) p2 = p1.with(y: 99) p2 # (A) p1 # (B)