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

For a plain value Struct, which behaviors hold?

Point = Struct.new(:x, :y) a = Point.new(1, 2) b = Point.new(1, 2) a == b # (1) Point.new(1).y # (2) a.map { |v| v * 10 } # (3)