add: $/DevDiv/Dev11/PU/MQPro/dlr/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/site_ruby/1.8/rubygems/defaults
add: $/DevDiv/Dev11/PU/MQPro/dlr/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/site_ruby/1.8/rubygems/defaults/ironruby.rb
File: ironruby.rb
===================================================================
--- [no source file]
+++ Shelved Change: $/DevDiv/Dev11/PU/MQPro/dlr/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/site_ruby/1.8/rubygems/defaults/ironruby.rb;gitsync
@@ -1,0 +1,24 @@
+#Tests are loading this file currently, so this should block it.
+unless $utr_runner
+  module Gem
+    def self.default_exec_format
+      exec_format = ConfigMap[:ruby_install_name].sub('ir', '%s') rescue '%s'
+
+      unless exec_format =~ /%s/ then
+        raise Gem::Exception,
+          "[BUG] invalid exec_format #{exec_format.inspect}, no %s"
+      end
+
+      exec_format
+    end
+
+    def self.platforms
+      [
+        Gem::Platform::RUBY,
+        Gem::Platform.new('universal-dotnet'),
+        Gem::Platform.local,
+        Gem::Platform.new('universal-unknown')
+      ]
+    end
+  end
+end
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/default.mspec;C1841263
File: default.mspec
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/default.mspec;C1841263  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/default.mspec;gitsync
@@ -12,4 +12,4 @@
 #
 #
 # ****************************************************************************
-load "#{ENV['DLR_ROOT']}\\External.LCA_RESTRICTED\\Languages\\IronRuby\\mspec\\default.mspec"
+load File.join(ENV['DLR_ROOT'],"External.LCA_RESTRICTED","Languages","IronRuby","mspec","default.mspec")
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C1841263
File: Initializers.Generated.cs
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C1841263  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;gitsync
@@ -1662,7 +1662,7 @@
             
             DefineLibraryMethod(module, "sticky?", 0x51, 
                 0x00000000U, 
-                new Func<System.IO.FileSystemInfo, System.Boolean>(IronRuby.Builtins.RubyFileOps.RubyStatOps.IsSticky)
+                new Func<System.IO.FileSystemInfo, System.Object>(IronRuby.Builtins.RubyFileOps.RubyStatOps.IsSticky)
             );
             
             DefineLibraryMethod(module, "symlink?", 0x51, 
@@ -1786,7 +1786,7 @@
             
             DefineLibraryMethod(module, "sticky?", 0x61, 
                 0x00010002U, 
-                new Func<IronRuby.Builtins.RubyModule, IronRuby.Builtins.MutableString, System.Boolean>(IronRuby.Builtins.FileTest.IsSticky)
+                new Func<IronRuby.Builtins.RubyModule, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.FileTest.IsSticky)
             );
             
             #if !SILVERLIGHT
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs;C1841263
File: FileOps.cs
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs;C1841263  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs;gitsync
@@ -938,8 +938,8 @@
             }
 
             [RubyMethod("sticky?")]
-            public static bool IsSticky(FileSystemInfo/*!*/ self) {
-                return false;
+            public static object IsSticky(FileSystemInfo/*!*/ self) {
+                return null;
             }
 
             [RubyMethod("symlink?")]
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileTest.cs;C1841263
File: FileTest.cs
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileTest.cs;C1841263  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileTest.cs;gitsync
@@ -114,7 +114,7 @@
         }
 
         [RubyMethod("sticky?", RubyMethodAttributes.PublicSingleton)]
-        public static bool IsSticky(RubyModule/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ path) {
+        public static object IsSticky(RubyModule/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ path) {
             return RubyFileOps.RubyStatOps.IsSticky(RubyFileOps.RubyStatOps.Create(self.Context, path));
         }
 
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs;C1841263
File: KernelOps.cs
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs;C1841263  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs;gitsync
@@ -1134,10 +1134,17 @@
             [DefaultProtocol, NotNull]MutableString/*!*/ file1) {
             cmd &= 0xFF;
             switch (cmd) {
-                case 'A': throw new NotImplementedException();
-                case 'b': throw new NotImplementedException();
-                case 'C': throw new NotImplementedException();
-                case 'c': throw new NotImplementedException();
+                case 'A':
+                    return RubyFileOps.RubyStatOps.AccessTime(RubyFileOps.RubyStatOps.Create(context, file1));
+
+                case 'b':
+                    return RubyFileOps.RubyStatOps.IsBlockDevice(RubyFileOps.RubyStatOps.Create(context, file1));
+
+                case 'C':
+                    return RubyFileOps.RubyStatOps.CreateTime(RubyFileOps.RubyStatOps.Create(context, file1));
+
+                case 'c':
+                    return RubyFileOps.RubyStatOps.IsCharDevice(RubyFileOps.RubyStatOps.Create(context, file1));
 
                 case 'd':
                     return RubyFileOps.DirectoryExists(context, file1);
@@ -1146,10 +1153,18 @@
                 case 'f':
                     return RubyFileOps.FileExists(context, file1);
 
-                case 'g': throw new NotImplementedException();
-                case 'G': throw new NotImplementedException();
-                case 'k': throw new NotImplementedException();
-                case 'l': throw new NotImplementedException();
+                case 'g':
+                    return RubyFileOps.RubyStatOps.IsSetGid(RubyFileOps.RubyStatOps.Create(context, file1));
+
+                case 'G':
+                    return RubyFileOps.RubyStatOps.IsGroupOwned(RubyFileOps.RubyStatOps.Create(context, file1));
+
+                case 'k':
+                    return RubyFileOps.RubyStatOps.IsSticky(RubyFileOps.RubyStatOps.Create(context, file1));
+
+                case 'l':
+                    return RubyFileOps.RubyStatOps.IsSymLink(RubyFileOps.RubyStatOps.Create(context, file1));
+
                 case 'M': throw new NotImplementedException();
                 case 'O': throw new NotImplementedException();
                 case 'o': throw new NotImplementedException();
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libs/etc.rb;C1841263
File: etc.rb
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libs/etc.rb;C1841263  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Libs/etc.rb;gitsync
@@ -13,20 +13,139 @@
 #
 # ****************************************************************************
 
-class Etc
+module Etc
+
+  Struct.new('Passwd', :name, :passwd, :uid, :gid, :gecos, :dir, :shell)
+  Struct.new('Group', :name, :passwd, :gid, :mem)
+
   class << self
-    def getlogin
-      ENV['USERNAME']
-    end
+    platform = System::PlatformID
+    case System::Environment.OSVersion.Platform
+    when platform.Win32S, platform.WinCE, platform.Win32Windows, platform.Win32NT:
+      def getlogin
+        ENV['USERNAME']
+      end
     
-    def endgrent(*args)
-      nil
-    end
+      def endgrent(*args)
+        nil
+      end
+
+      [:endpwent, :getgrent, :getgrgid, :getgrnam, :getpwent, 
+       :getpwnam, :getpwuid, :group, :passwd, :setgrent,
+       :setpwent].each do |method|
+        alias_method method, :endgrent
+      end
+    else
+      load_assembly 'Mono.Posix'
+ 
+      def endgrent
+        Mono::Unix::Native::Syscall.endgrent
+        nil
+      end
+
+      def endpwent
+        Mono::Unix::Native::Syscall.endpwent
+        nil
+      end
+
+      def getgrent
+        result = Mono::Unix::Native::Syscall.getgrent
+        to_group(result)
+      end
+
+      def getgrgid(p1)
+        result = Mono::Unix::Native::Syscall.getgrgid(p1)
+        to_group(result)
+      end
+
+      def getgrnam(p1)
+        result = Mono::Unix::Native::Syscall.getgrnam(p1.to_clr_string)
+        to_group(result)
+      end
+
+      def getlogin
+        result = Mono::Unix::Native::Syscall.getlogin
+        String.new(result)
+      end
+
+      def getpwent
+        result = Mono::Unix::Native::Syscall.getpwent
+        to_passwd(result)
+      end
+
+      def getpwnam(p1)
+        result = Mono::Unix::Native::Syscall.getpwnam(p1.to_clr_string)
+        to_passwd(result)
+      end
+
+      def getpwuid(p1)
+        result = Mono::Unix::Native::Syscall.getpwuid(p1)
+        to_passwd(result)
+      end
+
+     def group
+        if block_given? then
+          # Reset groups
+          setgrent
+
+          # Get the first group, then loop until the last, yielding the current group.
+          grp = getgrent
+          until grp.nil?
+            yield grp unless grp.nil?
+            grp = getgrent
+          end
+
+          # Reset groups.
+          setgrent
+        end
+        getgrent
+      end
+
+      def passwd
+        if block_given? then
+          # Reset passwd
+          setpwent
+
+          # Get the first passwd, then loop until the last, yielding the current passwd.
+          pw = getpwent
+          until pw.nil?
+            yield pw 
+            pw = getpwent
+          end
+
+          # Reset passwd.
+          setpwent
+        end
+        getpwent
+      end
+
+      def setgrent
+        Mono::Unix::Native::Syscall.setgrent
+        nil
+      end
+
+      def setpwent
+        Mono::Unix::Native::Syscall.setpwent
+        nil
+      end
+
+      private
+
+      def from_clr_array(clr_array)
+        # to_a converts a System::Array to a Ruby Array,
+        # but doesn't convert the internals to Ruby types.
+        Array.new(clr_array.length){ |i| clr_array[i].to_s }
+      end
+
+      def to_group(result)
+        Struct::Group.new(result.gr_name.to_s, result.gr_passwd.to_s, Fixnum.induced_from(result.gr_gid), from_clr_array(result.gr_mem)) unless result.nil?
+      end
+
+      def to_passwd(result)
+        Struct::Passwd.new(result.pw_name.to_s, result.pw_passwd.to_s, Fixnum.induced_from(result.pw_uid), Fixnum.induced_from(result.pw_gid), result.pw_gecos.to_s, result.pw_dir.to_s, result.pw_shell.to_s) unless result.nil?
+      end
 
-    [:endpwent, :getgrent, :getgrgid, :getgrnam, :getpwent, 
-     :getpwnam, :getpwuid, :group, :passwd, :setgrent,
-     :setpwent].each do |method|
-      alias_method method, :endgrent
     end
   end
 end
+
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Scripts/Dev.bat;C1841263
File: Dev.bat
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Scripts/Dev.bat;C1841263  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Scripts/Dev.bat;gitsync
@@ -14,7 +14,7 @@
 if EXIST "%PROGRAM_FILES_x86%" set PROGRAM_FILES_64=%ProgramW6432%
 
 REM ruby.exe needs to be on the path
-set RUBY18_BIN=
+set RUBY18_BIN=C:\Ruby\bin
 set RUBY18_EXE=ruby.exe
 set RUBY19_EXE=c:\ruby19\bin\ruby.exe
 set RUBYOPT=
===================================================================
add: $/DevDiv/Dev11/PU/MQPro/dlr/Languages/Ruby/Scripts/dev.sh
File: dev.sh
===================================================================
--- [no source file]
+++ Shelved Change: $/DevDiv/Dev11/PU/MQPro/dlr/Languages/Ruby/Scripts/dev.sh;gitsync
@@ -1,0 +1,36 @@
+#!/usr/bin/env bash
+
+export CURRENT=`pwd`
+export RUBY_SCRIPTS=$CURRENT  
+DROP=${CURRENT:(-23)}
+export MERLIN_ROOT=${CURRENT%$DROP}
+
+# ruby needs to be on the path
+export RUBY18_BIN=
+export RUBY18_EXE=ruby
+export RUBY19_EXE=ruby1.9
+export RUBYOPT=
+<<<<<<< HEAD:Merlin/Main/Languages/Ruby/Scripts/dev.sh
+export GEM_PATH="$MERLIN_ROOT/../External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8"
+=======
+export GEM_PATH="$MERLIN_ROOT/../External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p287/lib/ruby/gems/1.8"
+>>>>>>> linux:Merlin/Main/Languages/Ruby/Scripts/dev.sh
+
+chmod +x $MERLIN_ROOT/../External.LCA_RESTRICTED/Languages/IronRuby/mspec/mspec/bin/{mspec,mspec-ci,mkspec,mspec-run,mspec-tag}    
+chmod +x $MERLIN_ROOT/Test/Scripts/ir
+
+export PATH="$MERLIN_ROOT/Languages/Ruby/Scripts:$MERLIN_ROOT/Languages/Ruby/Scripts/bin:$RUBY18_BIN:$MERLIN_ROOT/../External.LCA_RESTRICTED/Languages/IronRuby/mspec/mspec/bin:$PATH"
+          
+if [ ! -f ~/.mspecrc ]; then
+  cp $MERLIN_ROOT/Languages/Ruby/default.mspec ~/.mspecrc
+fi
+
+source $MERLIN_ROOT/Scripts/Bat/Alias.sh
+fp=`which $0`
+dir=`dirname $fp`
+cd $dir
+
+# Run user specific setup
+#if EXIST %MERLIN_ROOT%/../Users/%USERNAME%/Dev.bat call %MERLIN_ROOT%/../Users/%USERNAME%/Dev.bat
+
+clear 
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Tests/Scripts/irtest.rb;C1841276
File: irtest.rb
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Tests/Scripts/irtest.rb;C1841276  (server)    6/3/2010 11:06 AM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Tests/Scripts/irtest.rb;gitsync
@@ -12,14 +12,23 @@
 
 flags = ["", "/partial", "/noadaptive", "/partial /noadaptive", "/sync0", "/sync1", "/debug", "/partial /debug"]
 
-ENV['DLR_BIN'] ||= "#{ENV['DLR_ROOT']}\\bin\\debug"
+# TODO: Check OS and set the debug folder name and cmd prefix appropriately.
+if RUBY_PLATFORM =~ /(mswin|mingw|bccwin|wince)/i then
+  debug_folder = 'debug'
+  cmd_prefix = ''
+else
+  debug_folder = 'mono_debug'
+  cmd_prefix = 'mono'
+end
+
+ENV['DLR_BIN'] ||= File.join("#{ENV['DLR_ROOT']}",'Bin',debug_folder)
 
 flags.each do |flag|  
-  cmd = "#{ENV['ROWAN_RUNTIME']} IronRuby.Tests.exe #{flag}"
+  cmd = cmd_prefix + "#{ENV['ROWAN_RUNTIME']} IronRuby.Tests.exe #{flag}"
   banner cmd
   Dir.chdir(ENV['DLR_BIN']) do
     exit 1 unless system cmd
   end
 end
 
-puts "OK"
+puts 'OK'
===================================================================
edit: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Tests/Scripts/utr/gem_tests.rb;C1841263
File: gem_tests.rb
===================================================================
--- $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Tests/Scripts/utr/gem_tests.rb;C1841263  (server)    6/3/2010 1:38 PM
+++ Shelved Change: $/devdiv/dev11/pu/mqpro/dlr/Languages/Ruby/Tests/Scripts/utr/gem_tests.rb;gitsync
@@ -5,6 +5,9 @@
   end
   
   def require_files
+    #HACK: this is loading up our defaults file which causes tests to fail.
+    #the global is to stop that loading
+    $utr_runner=true
     require 'rubygems'
   end
 
===================================================================
