Yup, exactly what TJ said in his lengthy reply to my original message. :-)

On Mon, Jun 9, 2008 at 10:22 PM, RobG <[EMAIL PROTECTED]> wrote:

>
> Read the ECMAScript spec, section 10.1.4.  To summarise, if a property
> with the same name as the identifier is not found on the scope chain,
> then return "a value of type Reference whose base object is null and
> whose property name is the Identifier".
>
> Having resolved the identifier, it now must be evaluated, section 12.4
> says:
>
> 1. Evaluate Expression.
> 2. Call GetValue(Result(1)).
> 3. Return (normal, Result(2), empty).
>
> When it gets to step 2 and calls GetValue...  Section 8.7.1 getValue
> says:
>
> 1. If Type(V) is not Reference, return V.
> 2. Call GetBase(V).
> 3. If Result(2) is null, throw a ReferenceError exception.
>
> Ta da.


-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to