コード例 #1
0
ファイル: RubyOps.cs プロジェクト: teejayvanslyke/ironruby
        public static RubyModuleScope/*!*/ CreateModuleScope(LocalsDictionary/*!*/ locals, RubyScope/*!*/ parent,
            RuntimeFlowControl/*!*/ rfc, RubyModule/*!*/ module) {
            Assert.NotNull(locals, parent, rfc, module);

            RubyModuleScope scope = new RubyModuleScope(parent, module, false, rfc, module);
            scope.SetDebugName((module.IsClass ? "class" : "module") + " " + module.Name);

            scope.Frame = locals;
            return scope;
        }
コード例 #2
0
ファイル: RubyOps.cs プロジェクト: tnachen/ironruby
        public static RubyModuleScope/*!*/ CreateModuleScope(LocalsDictionary/*!*/ locals, RubyScope/*!*/ parent, 
            RuntimeFlowControl/*!*/ rfc, RubyModule/*!*/ module) {
            Assert.NotNull(locals, parent, rfc, module);

            // TODO:
            RubyModuleScope scope = new RubyModuleScope(parent, locals, null, false);
            scope.Initialize(rfc, RubyMethodAttributes.PublicInstance, module);
            scope.SetModule(module);
            scope.SetDebugName((module.IsClass ? "class" : "module") + " " + module.Name);

            return scope;
        }
コード例 #3
0
ファイル: RubyOps.cs プロジェクト: tnachen/ironruby
 public static RubyModuleScope/*!*/ CreateModuleEvalScope(LocalsDictionary/*!*/ locals, RubyScope/*!*/ parent, object self, RubyModule module) {
     RubyModuleScope scope = new RubyModuleScope(parent, locals, module, true);
     scope.Initialize(parent.RuntimeFlowControl, RubyMethodAttributes.PublicInstance, self);
     scope.SetDebugName("top-module/instance-eval");                
     return scope;
 }