edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Driver.cs;C436555
File: Driver.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Driver.cs;C436555  (server)    6/9/2008 4:47 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Driver.cs;Partial1
@@ -23,6 +23,11 @@
 using System.IO;
 using Microsoft.Scripting.Runtime;
 using Ruby.Compiler;
+using System.Security;
+using System.Security.Permissions;
+using System.Security.Policy;
+using System.Collections;
+using Microsoft.Scripting.Utils;
 
 namespace Ruby.Tests {
     public delegate void TestCase();
@@ -54,7 +59,9 @@
 
             ScriptRuntimeSetup ses = new ScriptRuntimeSetup(true);
             _env = IronRuby.CreateRuntime(ses);
-            ScriptDomainManager.Options.DebugMode = true;
+            
+            // TODO: dynamic modules with symbols are not available in partial trust
+            ScriptDomainManager.Options.DebugMode = !driver.PartialTrust; 
 
             _engine = IronRuby.GetEngine(_env);
             _executionContext = IronRuby.GetExecutionContext(_engine);
@@ -74,6 +81,7 @@
         private static bool _optimizedScopes;
         private static bool _runTokenizerDriver;
         private static bool _displayList;
+        private static bool _partialTrust;
 
         public TestRuntime TestRuntime {
             get { return _testRuntime; }
@@ -91,62 +99,125 @@
             get { return _interpretedMode; }
         }
 
-        private static bool ParseArguments(string[]/*!*/ args, out List<string>/*!*/ largs) {
-            largs = new List<string>(args);
-            if (largs.Contains("/help") || largs.Contains("-?") || largs.Contains("/?") || largs.Contains("-help")) {
+        public bool PartialTrust {
+            get { return _partialTrust; }
+        }
+
+        private static bool ParseArguments(List<string>/*!*/ args) {
+            if (args.Contains("/help") || args.Contains("-?") || args.Contains("/?") || args.Contains("-help")) {
                 Console.WriteLine("Run All Tests      : [-X:Interpret]");
+                Console.WriteLine("Partial trust      : /partial");
                 Console.WriteLine("Run Specific Tests : [/debug] [/exclude] [test_to_run ...]");
                 Console.WriteLine("List Tests         : /list");
                 Console.WriteLine("Tokenizer baseline : /tokenizer <target-dir> <sources-file>");
                 Console.WriteLine("Productions dump   : /tokenizer /prod <target-dir> <sources-file>");
             }
 
-            if (largs.Contains("/list")) {
+            if (args.Contains("/list")) {
                 _displayList = true;
                 return true;
             }
 
-            if (largs.Contains("/debug")) {
-                largs.Remove("/debug");
+            if (args.Contains("/debug")) {
+                args.Remove("/debug");
                 _isDebug = true;
             }
 
-            if (largs.Contains("/opts")) {
-                largs.Remove("/opts");
+            if (args.Contains("/opts")) {
+                args.Remove("/opts");
                 _optimizedScopes = true;
             }
 
-            if (largs.Contains("/exclude")) {
+            if (args.Contains("/partial")) {
+                args.Remove("/partial");
+                _partialTrust = true;
+            }
+
+            if (args.Contains("/exclude")) {
                 _excludeSelectedCases = true;
-                largs.Remove("/exclude");
+                args.Remove("/exclude");
             }
 
             // Configure the EngineOptions
-            if (largs.Contains("-X:Interpret")) {
-                largs.Remove("-X:Interpret");
+            if (args.Contains("-X:Interpret")) {
+                args.Remove("-X:Interpret");
                 _interpretedMode = true;
             }
 
-            if (largs.Contains("/tokenizer")) {
-                largs.Remove("/tokenizer");
+            if (args.Contains("/tokenizer")) {
+                args.Remove("/tokenizer");
                 _runTokenizerDriver = true;
             }
 
             return true;
         }
 
-        public static void Main(string[] args) {
-            List<string> largs;
-            if (!ParseArguments(args, out largs)) {
-                return;
+        public static void Main(string[]/*!*/ arguments) {
+            List<string> args = new List<string>(arguments);
+            if (args.Contains("/partial")) {
+                PermissionSet ps = CreatePermissionSetByName();
+                AppDomainSetup setup = new AppDomainSetup();
+                setup.ApplicationBase = Environment.CurrentDirectory;
+                AppDomain domain = AppDomain.CreateDomain("Tests", null, setup, ps); 
+                
+                Loader loader = new Loader(args);
+                domain.DoCallBack(new CrossAppDomainDelegate(loader.Run));
+                
+                Environment.ExitCode = loader.ExitCode;
+            } else {
+                Environment.ExitCode = Run(args);
             }
+        }
 
+        public sealed class Loader : MarshalByRefObject {
+            public int ExitCode;
+            public readonly List<string>/*!*/ Args;
+
+            public Loader(List<string>/*!*/ args) {
+                Args = args;
+            }
+
+            public void Run() {
+                ExitCode = Driver.Run(Args);
+            }
+        }
+
+        private static PermissionSet/*!*/ CreatePermissionSetByName() {
+            string name = "Internet";
+            bool foundName = false;
+            PermissionSet setIntersection = new PermissionSet(PermissionState.Unrestricted);
+
+            // iterate over each policy level
+            IEnumerator e = SecurityManager.PolicyHierarchy();
+            while (e.MoveNext()) {
+                PolicyLevel level = (PolicyLevel)e.Current;
+                PermissionSet levelSet = level.GetNamedPermissionSet(name);
+                if (levelSet != null) {
+                    foundName = true;
+                    setIntersection = setIntersection.Intersect(levelSet);
+                }
+            }
+
+            if (setIntersection == null || !foundName) {
+                setIntersection = new PermissionSet(PermissionState.None);
+            } else {
+                setIntersection = new NamedPermissionSet(name, setIntersection);
+            }
+
+            return setIntersection;
+        }       
+
+        public static int Run(List<string>/*!*/ args) {
+            if (!ParseArguments(args)) {
+                return -3;
+            }
+
             int status = 0;
 
             if (_runTokenizerDriver) {
                 TokenizerTestDriver driver = new TokenizerTestDriver(IronRuby.GetExecutionContext(IronRuby.CreateRuntime()).Context);
-                if (!driver.ParseArgs(largs)) {
-                    return;
+                if (!driver.ParseArgs(args)) {
+                    return -3;
                 }
 
                 status = driver.RunTests();
@@ -155,7 +226,7 @@
                 Driver driver = new Driver();
 
                 if (Manual.TestCode.Trim().Length == 0) {
-                    status = driver.RunUnitTests(largs);
+                    status = driver.RunUnitTests(args);
                 } else {
                     driver.RunManualTest();
 
@@ -165,7 +236,7 @@
             }
 
             // return failure on bad filter (any real failures throw)
-            Environment.ExitCode = status;
+            return status;
         }
 
         private static void InitializeDomain() {
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Parser/ParserTests.cs;C449929
File: ParserTests.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Parser/ParserTests.cs;C449929  (server)    6/9/2008 6:29 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Parser/ParserTests.cs;Partial1
@@ -43,7 +43,9 @@
 
         // manual test
         public void Scenario_ParserLogging() {
-            ParserLoggingTest();
+            if (!_driver.PartialTrust) {
+                ParserLoggingTest();
+            }
         }
 
         private void ParserLoggingTest() {
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Properties/AssemblyInfo.cs;C390406
File: AssemblyInfo.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Properties/AssemblyInfo.cs;C390406  (server)    6/11/2008 11:19 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Properties/AssemblyInfo.cs;Partial1
@@ -16,6 +16,7 @@
 using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
+using System.Security;
 
 // General Information about an assembly is controlled through the following 
 // set of attributes. Change these attribute values to modify the information
@@ -46,3 +47,5 @@
 //
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AllowPartiallyTrustedCallers]
+[assembly: SecurityTransparent]
\ No newline at end of file
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/ClrTests.cs;C457823
File: ClrTests.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/ClrTests.cs;C457823  (server)    6/11/2008 11:22 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/ClrTests.cs;Partial1
@@ -158,6 +158,9 @@
         }
 
         public void ClrMethodsVisibility1() {
+            // TODO: 
+            if (_driver.PartialTrust) return;
+
             ExecutionContext.ObjectClass.SetConstant("C", ExecutionContext.GetClass(typeof(ClassWithMethods2)));
             AssertOutput(delegate() {
                 CompilerTest(@"
@@ -426,6 +429,9 @@
         }
 
         public void ClrEvents1() {
+            // TODO:
+            if (_driver.PartialTrust) return;
+
             AssertOutput(delegate() {
                 CompilerTest(@"
 require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/LoaderTests.cs;C444795
File: LoaderTests.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/LoaderTests.cs;C444795  (server)    6/11/2008 11:17 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/LoaderTests.cs;Partial1
@@ -73,6 +73,8 @@
         }
 
         public void Require1() {
+            if (_driver.PartialTrust) return;
+
             try {
                 string temp = _driver.MakeTempDir();
                 ExecutionContext.Loader.SetLoadPaths(temp);
@@ -103,6 +105,8 @@
         }
 
         public void Load1() {
+            if (_driver.PartialTrust) return;
+
             try {
                 string temp = _driver.MakeTempDir();
                 ExecutionContext.Loader.SetLoadPaths(temp);
@@ -124,6 +128,8 @@
         }
 
         public void RequireInterop1() {
+            if (_driver.PartialTrust) return;
+
             try {
                 string temp = _driver.MakeTempDir();
                 ExecutionContext.Loader.SetLoadPaths(temp);
@@ -154,11 +160,14 @@
                 Debug.Assert(module == Context.ObjectClass);
 
                 module.DefineLibraryMethod("object_monkey", 0x9, new System.Delegate[] {
-                    new Function<object, string>(delegate(object obj) { 
-                        return "This is monkey!";
-                    }),
+                    new Function<object, string>(MonkeyWorker),
                 });
             }
+
+            // TODO: might be called by MI.Invoke -> needs to be public in partial trust
+            public static string MonkeyWorker(object obj) {
+                return "This is monkey!";
+            }
         }
 
         public void LibraryLoader1() {
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Properties/AssemblyInfo.cs;C402163
File: AssemblyInfo.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Properties/AssemblyInfo.cs;C402163  (server)    6/9/2008 5:51 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Properties/AssemblyInfo.cs;Partial1
@@ -18,6 +18,7 @@
 using System.Runtime.InteropServices;
 using Ruby.Hosting;
 using Ruby.Runtime;
+using System.Security;
 
 [assembly: AssemblyTitle("Ruby Libraries")]
 [assembly: AssemblyDescription("")]
@@ -34,4 +35,6 @@
 #if !SILVERLIGHT
 [assembly: AssemblyVersion(RubyContext.IronRubyVersionString)]
 [assembly: AssemblyFileVersion(RubyContext.IronRubyVersionString)]
+[assembly: AllowPartiallyTrustedCallers]
+[assembly: SecurityTransparent]
 #endif
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyClass.cs;C462814
File: RubyClass.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyClass.cs;C462814  (server)    6/11/2008 11:34 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyClass.cs;Partial1
@@ -167,8 +167,9 @@
             return result;
         }
 
+        // TODO: public due to partial trust
         // implements Class.new
-        internal static object CreateAnonymousClass(CodeContext/*!*/ context, BlockParam body, [Optional]RubyClass superClass) {
+        public static object CreateAnonymousClass(CodeContext/*!*/ context, BlockParam body, [Optional]RubyClass superClass) {
             RubyExecutionContext ec = RubyUtils.GetExecutionContext(context);
             RubyModule owner = RubyUtils.GetScope(context).GetInnerMostModule();
             
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs;C461342
File: Loader.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs;C461342  (server)    6/9/2008 6:22 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs;Partial1
@@ -592,7 +592,7 @@
         public static string/*!*/ GetIronRubyAssemblyLongName(string/*!*/ simpleName) {
             ContractUtils.RequiresNotNull(simpleName, "simpleName");
 #if SIGNED
-            return simpleName + ", Version=" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + ", Culture=neutral, PublicKeyToken=31bf3856ad364e35";
+            return simpleName + ", Version=" + RubyContext.IronRubyVersionString + ", Culture=neutral, PublicKeyToken=31bf3856ad364e35";
 #else
             return simpleName;
 #endif
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;C450622
File: RubyExceptionData.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;C450622  (server)    6/11/2008 11:24 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;Partial1
@@ -22,6 +22,8 @@
 using Ruby.Builtins;
 using System.Diagnostics;
 using System.Collections.Generic;
+using System.Security;
+using System.Security.Permissions;
 
 namespace Ruby.Runtime {
     /// <summary>
@@ -46,6 +48,8 @@
             RubyArray result = new RubyArray();
             int skipFrames = 0;
 
+            bool hasFileAccessPermissions = DetectFileAccessPermissions();
+
 #if SILVERLIGHT // TODO: StackTrace.ctor(exception) security critical
             foreach (string line in _exception.StackTrace.Split('\n')) {
                 string frame = line.Trim();
@@ -68,11 +72,11 @@
                 result.Add(FormatFrame(methodName, lineNumber, fileName));
             }
 #else
-            AddBacktrace(result, new StackTrace(_exception, true).GetFrames(), ref skipFrames);
+            AddBacktrace(result, new StackTrace(_exception, true).GetFrames(), hasFileAccessPermissions, ref skipFrames);
 #endif
             if (_catchSiteTrace != null) {
                 skipFrames = 1; // the catch-site frame is already included
-                AddBacktrace(result, _catchSiteTrace.GetFrames(), ref skipFrames);
+                AddBacktrace(result, _catchSiteTrace.GetFrames(), hasFileAccessPermissions, ref skipFrames);
             }
 
             _backtrace = result;
@@ -88,16 +92,32 @@
         }
 
         public static RubyArray/*!*/ CreateBacktrace(IEnumerable<StackFrame>/*!*/ stackTrace, int skipFrames) {
-            return AddBacktrace(new RubyArray(), stackTrace, ref skipFrames);
+            return AddBacktrace(new RubyArray(), stackTrace, DetectFileAccessPermissions(), ref skipFrames);
         }
 
-        private static RubyArray/*!*/ AddBacktrace(RubyArray/*!*/ result, IEnumerable<StackFrame>/*!*/ stackTrace, ref int skipFrames) {
+        // TODO: partial trust
+        private static bool DetectFileAccessPermissions() {
+#if SILVERLIGHT
+            return false;
+#else
+            try {
+                new FileIOPermission(PermissionState.Unrestricted).Demand();
+                return true;
+            } catch (SecurityException) {
+                return false;
+            }
+#endif
+        }
+
+        private static RubyArray/*!*/ AddBacktrace(RubyArray/*!*/ result, IEnumerable<StackFrame>/*!*/ stackTrace, bool hasFileAccessPermission, 
+            ref int skipFrames) {
+
             foreach (StackFrame frame in stackTrace) {
                 if (IsVisibleFrame(frame.GetMethod())) {
                     if (skipFrames == 0) {
                         string methodName, file;
                         int line;
-                        GetStackFrameInfo(frame, out methodName, out file, out line);
+                        GetStackFrameInfo(frame, hasFileAccessPermission, out methodName, out file, out line);
                         result.Add(MutableString.Create(FormatFrame(file, line, methodName)));
                     } else {
                         skipFrames--;
@@ -115,7 +135,9 @@
             }
         }
 
-        private static void GetStackFrameInfo(StackFrame/*!*/ frame, out string/*!*/ methodName, out string/*!*/ fileName, out int line) {
+        private static void GetStackFrameInfo(StackFrame/*!*/ frame, bool hasFileAccessPermission, 
+            out string/*!*/ methodName, out string/*!*/ fileName, out int line) {
+
             MethodBase method = frame.GetMethod();
             methodName = method.Name;
 
@@ -123,7 +145,7 @@
             fileName = null;
             line = 0;
 #else
-            fileName = frame.GetFileName();
+            fileName = (hasFileAccessPermission) ? frame.GetFileName() : null;
             line = frame.GetFileLineNumber();
 #endif
             if (!TryParseRubyMethodName(ref methodName, ref fileName, ref line)) {
@@ -141,7 +163,7 @@
 #if !SILVERLIGHT
             if (String.IsNullOrEmpty(fileName)) {
                 if (method.DeclaringType != null) {
-                    fileName = method.DeclaringType.Assembly.GetName().Name;
+                    fileName = (hasFileAccessPermission) ? method.DeclaringType.Assembly.GetName().Name : null;
                     line = 0;
                 }
             }
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExecutionContext.cs;C459988
File: RubyExecutionContext.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExecutionContext.cs;C459988  (server)    6/9/2008 5:53 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExecutionContext.cs;Partial1
@@ -29,6 +29,7 @@
 using System.Text;
 using System.IO;
 using Microsoft.Scripting.Ast;
+using System.Security;
 
 namespace Ruby.Runtime {
     /// <summary>
@@ -322,8 +323,14 @@
             DefineGlobalVariableNoLock(SymbolTable.StringToId("KCODE"), Runtime.GlobalVariables.KCode);
             DefineGlobalVariableNoLock(SymbolTable.StringToId("-K"), Runtime.GlobalVariables.KCode);
             DefineGlobalVariableNoLock(SymbolTable.StringToId("SAFE"), Runtime.GlobalVariables.SafeLevel);
-            DefineGlobalVariableNoLock(Symbols.CurrentProcessId, new ReadOnlyGlobalVariableInfo(Process.GetCurrentProcess().Id));
-            DefineGlobalVariableNoLock(Symbols.CurrentProcessId, new ReadOnlyGlobalVariableInfo(Process.GetCurrentProcess().Id));
+
+            try {
+                Process process = Process.GetCurrentProcess();
+                DefineGlobalVariableNoLock(Symbols.CurrentProcessId, new ReadOnlyGlobalVariableInfo(process.Id));
+                DefineGlobalVariableNoLock(Symbols.CurrentProcessId, new ReadOnlyGlobalVariableInfo(process.Id));
+            } catch (SecurityException) {
+                // nop
+            }
 #endif
         }
 
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyScope.cs;C458956
File: RubyScope.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyScope.cs;C458956  (server)    6/11/2008 11:15 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyScope.cs;Partial1
@@ -509,8 +509,9 @@
             _definitionsModule = definitionsModule;
         }
         
+        // TODO: might be called by MI.Invoke -> needs to be public in partial trust
         // method_missing on top-level DLR created scope:
-        internal static object TopMethodMissing(CodeContext/*!*/ context, object/*!*/ self, BlockParam block, SymbolId name, [NotNull]params object[]/*!*/ args) {
+        public static object TopMethodMissing(CodeContext/*!*/ context, object/*!*/ self, BlockParam block, SymbolId name, [NotNull]params object[]/*!*/ args) {
             Assert.NotNull(context, self);
             Scope globalScope = context.GlobalScope;
             Debug.Assert(globalScope != null);
===================================================================
edit: $/Dev10/feature/vs_langs01/ndp/fx/src/Core/Microsoft/Scripting/Generation/AssemblyGen.cs;C461657
File: AssemblyGen.cs
===================================================================
--- $/Dev10/feature/vs_langs01/ndp/fx/src/Core/Microsoft/Scripting/Generation/AssemblyGen.cs;C461657  (server)    6/11/2008 10:44 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/ndp/fx/src/Core/Microsoft/Scripting/Generation/AssemblyGen.cs;Partial1
@@ -88,11 +88,18 @@
                 _outDir = outDir;
             }
 
+            // mark the assembly transparent so that it works in partial trust:
+            CustomAttributeBuilder[] attributes = new CustomAttributeBuilder[] { 
+                new CustomAttributeBuilder(typeof(SecurityTransparentAttribute).GetConstructor(Type.EmptyTypes), ArrayUtils.EmptyObjects)
+            };
+
             if (outDir != null) {
-                _myAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.RunAndSave, outDir);
+                _myAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.RunAndSave, outDir, 
+                    null, null, null, null, false, attributes);
+
                 _myModule = _myAssembly.DefineDynamicModule(name.Name, _outFileName, isDebuggable);
             } else {
-                _myAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run);
+                _myAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run, attributes);
                 _myModule = _myAssembly.DefineDynamicModule(name.Name, isDebuggable);
             }
 
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Properties/AssemblyInfo.cs;C436739
File: AssemblyInfo.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Properties/AssemblyInfo.cs;C436739  (server)    6/9/2008 5:51 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Properties/AssemblyInfo.cs;Partial1
@@ -1,6 +1,7 @@
 ?using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
+using System.Security;
 
 // General Information about an assembly is controlled through the following 
 // set of attributes. Change these attribute values to modify the information
@@ -34,3 +35,6 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AllowPartiallyTrustedCallers]
+[assembly: SecurityTransparent]
+
===================================================================
