private object Run(Scope /*!*/ scope, bool bindGlobals) { RubyScope localScope; RubyContext context = (RubyContext)LanguageContext; switch (_kind) { case TopScopeFactoryKind.Hosted: localScope = RubyTopLevelScope.CreateHostedTopLevelScope(scope, context, bindGlobals); break; case TopScopeFactoryKind.Main: localScope = RubyTopLevelScope.CreateTopLevelScope(scope, context, true); break; case TopScopeFactoryKind.File: localScope = RubyTopLevelScope.CreateTopLevelScope(scope, context, false); break; case TopScopeFactoryKind.WrappedFile: localScope = RubyTopLevelScope.CreateWrappedTopLevelScope(scope, context); break; default: throw Assert.Unreachable; } return(Target(localScope, localScope.SelfObject)); }