emberjs/ember.js — pull request #3852 by mixonic (2013-12-04 15:56:28+00:00)
Title: [BUGFIX] Do not assume null Ember.get targets are all globals

Some bugfixin'.

* Changes globals to only mean properties starting with `$` or a
capital letter.
* Changes `normalizeTuple(obj, 'Foo')` to resolve `Foo` as a global. This makes the behavior consistent with `normalizeTuple(obj, 'Foo.bar')` which already resolves `Foo` as a global (and looks up `bar`).
* Changes `normalizeTuple(null, 'Foo')` to resolve `Foo` as a global.
* Specs `normalizeTuple('null', 'foo')` to resolve to `[undefined, '']`.
This is unfortunate but needed to keep `getPath` happy.

This code is old, and tricky to modify due to perf optimizations and edge case behavior. It would be great to refactor more heavily at some other date.

Fixes #3760

/cc @bantic @hejld