Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyfreeze and immutabilitySingle-choice MCQ

On Ruby 3.x, what does the unary-plus operator (String#+@) return when applied to a string?

frozen = "abc".freeze live = "xyz" p (+frozen).equal?(frozen) p (+live).equal?(live)