Skip to content

Commit

Permalink
Define modules onto parent scope literal (Opal.A.B.C)
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 18, 2013
1 parent b73e1e7 commit ce381f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions corelib/runtime.js
Expand Up @@ -219,6 +219,9 @@
module._name = (base === RubyObject ? id : base._name + '::' + id);

create_scope(base._scope, module, id);

// Name new module directly onto current scope (Opal.Foo.Baz = module)
base[id] = base._scope[id] = module;
}

return module;
Expand Down

0 comments on commit ce381f9

Please sign in to comment.