Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyobject memory RVALUE embedded stringsSingle-choice MCQ

In MRI, a String stored with an embedded buffer (no separate heap allocation for the char data) keeps its bytes inside the RVALUE/RString struct itself. What is the main constraint that decides whether a given string can use this embedded form?

s = "hi" # short big = "x" * 1000 # long