Hi,

At Fri, 22 Aug 2003 20:33:25 +0900,
Robert Feldt wrote:
> How are "dynamic" strings represented internally?

NodeDump or ii would help you.

> I thought
> 
> "a#{b}"
> 
> was represented
> 
> DSTR["a", EVSTR[STR["b"]]

It is represented as DSTR["a", EVSTR[b]], in your style.

> As a concrete example how is
> 
> "a#{b}_c#{1+d}"
> 
> represented in the internal parse tree?

DSTR["a", EVSTR[b], "_c", EVSTR[1+d]]

In 1.8, it will be executed as:

  "a" << b.to_s << "_c" << (1+d).to_s

Just except with internal functions (correspond to to_s and <<)
will be used directly instead of ordinary methods calls.

-- 
Nobu Nakada