Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyYARV bytecodeSingle-choice MCQ

When MRI compiles `h["name"]` where the key is a string literal, it emits the specialized `opt_aref_with` instruction. What concrete optimization does this instruction encode compared to a generic `[]` call?

RubyVM::InstructionSequence.compile('h["name"]').disasm # ... opt_aref_with "name", <calldata!mid:[], argc:1, ...>