[#1378] differences between Module and Class ? — Mathieu Bouchard <matju@...>

25 messages 2003/08/11
[#1387] Re: differences between Module and Class ? — matz@... (Yukihiro Matsumoto) 2003/08/12

Hi,

[#1442] Re: differences between Module and Class ? — Mathieu Bouchard <matju@...> 2003/08/21

[#1406] _id2ref bug? — Ryan Pavlik <rpav@...>

While debugging some caching code, I've come across a segfault related

22 messages 2003/08/14
[#1407] Re: _id2ref bug? — matz@... (Yukihiro Matsumoto) 2003/08/14

Hi,

[#1413] Re: _id2ref bug? (REPRODUCED, short) — Ryan Pavlik <rpav@...> 2003/08/14

On Fri, 15 Aug 2003 01:57:18 +0900

Re: NODE_DSTR and NODE_EVSTR?

From: nobu.nokada@...
Date: 2003-08-22 11:53:52 UTC
List: ruby-core #1455
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

In This Thread