Refactor StringLiterals#on_str to use use the same local variable