edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/context.rb;C503216
File: context.rb
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/context.rb;C503216  (server)    8/6/2008 2:43 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/context.rb;alpha-3
@@ -30,6 +30,20 @@
     pattern = Regexp.new "\<#{name}\>#{old_value}\<\/#{name}\>", Regexp::MULTILINE
     self.gsub! pattern, "\<#{name}\>#{new_value}\<\/#{name}\>"
   end
+
+  def change_configuration!(name, value)
+    source = self.clone
+    group = "<PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == '#{name}' \">"
+    found = false
+    self.replace ''
+    source.each do |line|
+      match = line.match /\<DefineConstants\>/
+      index = match.nil? ? -1 : match.begin(0)
+      self << (found && index > 0 ? " " * 4 + "<DefineConstants>#{value}</DefineConstants>\n" : line)
+      found = true if line.include? group
+      found = false if line.include? "</PropertyGroup>"
+    end
+  end
 end
 
 module SvnProvider
@@ -151,7 +165,7 @@
 Configuration.define do
   group(:common) {
     switches :all, 'nologo', 'noconfig', 'nowarn:1591,1701,1702', 'errorreport:prompt', 'warn:4', 'warnaserror-'
-    switches :debug, 'define:"DEBUG;TRACE;SIGNED;DLR"', 'debug+', 'debug:full', 'optimize-', 'delaysign+'
+    switches :debug, 'define:"DEBUG;TRACE;SIGNED;MICROSOFT_SCRIPTING_CORE"', 'debug+', 'debug:full', 'optimize-', 'delaysign+'
     switches :release, 'define:TRACE', 'optimize+'
     references 'System.dll'
   }
@@ -268,7 +282,7 @@
 
     def copy_dir(source_dir, target_dir, options = '')
       log_filename = Pathname.new(Dir.tmpdir) + "rake_transform.log"
-      exec_f "robocopy \"#{source_dir}\" \"#{target_dir}\" #{DEFAULT_ROBOCOPY_OPTIONS} /LOG+:#{log_filename} #{options}"
+      exec_f %Q{robocopy "#{source_dir}" "#{target_dir}" #{DEFAULT_ROBOCOPY_OPTIONS} "/LOG+:#{log_filename}" #{options}}
     end
 
     def copy_to_temp_dir(name, temp_dir, extras = [])
@@ -287,7 +301,7 @@
 
     def del(name, *paths)
       dir = name.is_a?(Symbol) ? get_source_dir(name) : name
-      Dir.chdir(dir) { paths.each { |path| exec_f "del #{path}" } }
+      Dir.chdir(dir) { paths.each { |path| exec_f %Q{del "#{path}"} } }
     end
 
     def chdir(env, &b)
@@ -318,7 +332,7 @@
     def diff_directories(temp_dir)
       source_dirs, target_dirs = [], []
 
-      nodes = [:root, :gppg, :dlr_core, :dlr_libs, :ironruby, :libraries, :tests, :console, :generator, :test_runner, :scanner, :yaml, :libs]
+      nodes = [:root, :gppg, :dlr_core, :dlr_libs, :ironruby, :libraries, :tests, :console, :generator, :test_runner, :scanner, :yaml, :stdlibs, :ironlibs]
       nodes.each do |node|
         if is_recursive? node
           source_dirs += (temp_dir + get_relative_target_dir(node)).filtered_subdirs.map { |d| d.relative_path_from(temp_dir).downcase }
@@ -399,7 +413,7 @@
 
     def resgen(base_path, resource_map)
       resource_map.each_pair do |input, output|
-        exec "resgen \"#{base_path + input.dup}\" \"#{build_path + output}\""
+        exec %Q{resgen "#{base_path + input.dup}" "#{build_path + output}"}
       end
     end
 
@@ -498,6 +512,10 @@
       contents.gsub! Regexp.new(Regexp.escape("<Import Project=\"#{old}\" />"), Regexp::IGNORECASE), "<Import Project=\"#{new}\" />"
     end
 
+    def replace_post_build_event(contents, old, new)
+      contents.gsub! Regexp.new(Regexp.escape("<PostBuildEvent>#{old}</PostBuildEvent>"), Regexp::IGNORECASE), "<PostBuildEvent>#{new}</PostBuildEvent>"
+    end
+
     def transform_project(name, project)
       path = get_target_dir(name) + project
       rake_output_message "Transforming: #{path}"
@@ -659,7 +677,8 @@
   map :test_runner, :merlin => 'merlin/main/languages/ruby/ironruby.tests', :svn => 'utils/IronRuby.Tests'
   map :scanner, :merlin => 'merlin/main/languages/ruby/utils/ironruby.libraries.scanner', :svn => 'utils/ironruby.libraries.scanner'
   map :build, :merlin => 'merlin/main/bin', :svn => 'build'
-  map :libs, :merlin => 'merlin/main/languages/ruby/libs', :svn => 'libs'
+  map :stdlibs, :merlin => 'merlin/external/languages/ruby/redist-libs', :svn => 'lib'
+  map :ironlibs, :merlin => 'merlin/main/languages/ruby/libs', :svn => 'lib/IronRuby'
 end
 
 # Spec runner helpers
@@ -681,7 +700,7 @@
   end
 
   def regression(ruby, klass, method = nil)
-    cmd = "#{UserEnvironment.mri} #{UserEnvironment.mspec}/bin/mspec ci -t #{ruby.join(" ")} -f summary -V -B #{UserEnvironment.config} #{UserEnvironment.rubyspec}/1.8/core/#{klass}"
+    cmd = %Q{"#{UserEnvironment.mri_binary}" "#{UserEnvironment.mspec}/bin/mspec" ci -t #{ruby} -fm -V -B "#{UserEnvironment.config}" "#{UserEnvironment.rubyspec}/1.8/core/#{klass}"}
     cmd += "/#{method}_spec.rb" unless method.nil?
     cmd += " > #{tempdir}/out.txt"
     system cmd
@@ -701,26 +720,23 @@
   end
 
   def all_core(method, ruby)
-    Dir["#{UserEnvironment.rubyspec}/1.8/core/*"].each do |path|
-      klass = File.basename(path)
-      send method, ruby, klass
-    end
+    send method, ruby, '*'
   end
 
   def why_regression(ruby, klass, method = nil)
-    cmd = "#{UserEnvironment.mri} #{UserEnvironment.mspec}/bin/mspec ci -t #{ruby.join(" ")} -f specdoc -V -B #{UserEnvironment.config} #{UserEnvironment.rubyspec}/1.8/core/#{klass}"
+    cmd = %Q{#{UserEnvironment.mri_binary} "#{UserEnvironment.mspec}/bin/mspec" ci -t #{ruby} -fs -V -B "#{UserEnvironment.config}" "#{UserEnvironment.rubyspec}/1.8/core/#{klass}"}
     cmd += "/#{method}_spec.rb" unless method.nil?
     system cmd
   end
 
   def test(ruby, klass, method = nil)
-    cmd = "#{UserEnvironment.mri} #{UserEnvironment.mspec}/bin/mspec run -t #{ruby.join(" ")} -G critical -V -f specdoc -B #{UserEnvironment.config} #{UserEnvironment.rubyspec}/1.8/core/#{klass}"
+    cmd = %Q{#{UserEnvironment.mri_binary} "#{UserEnvironment.mspec}/bin/mspec" run -t #{ruby} -Gcritical -V -fs -B "#{UserEnvironment.config}" "#{UserEnvironment.rubyspec}/1.8/core/#{klass}"}
     cmd += "/#{method}_spec.rb" unless method.nil?
     system cmd
   end
 
   def baseline(ruby, klass, method = nil)
-    cmd = "#{UserEnvironment.mri} #{UserEnvironment.mspec}/bin/mspec tag -t #{ruby.join(" ")} -f specdoc -V -G critical -B #{UserEnvironment.config} #{UserEnvironment.rubyspec}/1.8/core/#{klass}"
+    cmd = %Q{#{UserEnvironment.mri_binary} "#{UserEnvironment.mspec}/bin/mspec" tag -t #{ruby} -fs -V -Gcritical -B "#{UserEnvironment.config}" "#{UserEnvironment.rubyspec}/1.8/core/#{klass}"}
     cmd << "/#{method}_spec.rb" unless method.nil?
     system cmd
   end
@@ -732,7 +748,7 @@
       f.readlines.each do |line|
         file,_,tag,desc = line.chomp.split(":")
         fulltag = tag << ":" << desc
-        filepath = "#{UserEnvironment.tags}\\1.8\\#{file}"
+        filepath = "#{UserEnvironment.tags}/1.8/#{file}"
         filedir = File.dirname(filepath)
         FileUtils.mkdir_p(filedir) unless File.exist?(filedir)
         FileUtils.touch(filepath) unless File.exist?(filepath)
@@ -770,6 +786,10 @@
     result
   end
 
+  def self.mri_binary
+    self.mri + '/bin/ruby.exe'
+  end
+
   def self.method_missing(sym, *args)
     name = sym.to_s
     if name =~ /\?$/
===================================================================
add: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/external_ir.exe.config
File: external_ir.exe.config
===================================================================
--- [no source file]
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/external_ir.exe.config;alpha-3
@@ -1,0 +1,5 @@
+<configuration>
+  <appSettings>
+    <add key="LibPaths" value="..\..\lib\IronRuby;..\..\lib\ruby\site_ruby\1.8;..\..\lib\ruby\site_ruby;..\..\lib\ruby\1.8" />
+  </appSettings>
+</configuration>
===================================================================
add: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/ir.exe.config
File: ir.exe.config
===================================================================
--- [no source file]
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/ir.exe.config;alpha-3
@@ -1,0 +1,5 @@
+<configuration>
+  <appSettings>
+    <add key="LibPaths" value="..\lib\IronRuby;..\lib\ruby\site_ruby\1.8;..\lib\ruby\site_ruby;..\lib\ruby\1.8" />
+  </appSettings>
+</configuration>
===================================================================
add: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/merlin_ir.exe.config
File: merlin_ir.exe.config
===================================================================
--- [no source file]
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/merlin_ir.exe.config;alpha-3
@@ -1,0 +1,5 @@
+<configuration>
+  <appSettings>
+    <add key="LibPaths" value="..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\site_ruby;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\1.8" />
+  </appSettings>
+</configuration>
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Rakefile;C503216
File: Rakefile
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Rakefile;C503216  (server)    8/6/2008 2:43 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Rakefile;alpha-3
@@ -30,7 +30,6 @@
 # Paths to configure
 
 IRONRUBY_COMPILER     = 'ir.exe'
-IRONRUBY_BINARY       = 'ir.cmd'
 CS_COMPILER           = ENV['mono'].nil? ? 'csc' : 'gmcs'
 EXCLUDED_EXTENSIONS   = ['.old', '.suo', '.vspscc', '.vssscc', '.user', '.log', '.pdb', '.cache', '.swp']
 EXCLUDED_DIRECTORIES  = ['.svn', 'obj', '.', '..']
@@ -72,7 +71,7 @@
     # This lets us diff the temp target layout with the actual layout
 
     temp_dir = generate_temp_dir
-    nodes = [:root, :gppg, :dlr_core, :dlr_libs, :ironruby, :libraries, :tests, :console, :generator, :test_runner, :scanner, :yaml, :libs]
+    nodes = [:root, :gppg, :dlr_core, :dlr_libs, :ironruby, :libraries, :tests, :console, :generator, :test_runner, :scanner, :yaml, :stdlibs, :ironlibs]
     nodes.each do |node|
       # special case tests directory to avoid filtering sub-directories
       if node == :tests
@@ -166,7 +165,25 @@
       end
     end
     transform_project :generator, 'classinitgenerator.csproj'
-    transform_project :console, 'ruby.console.csproj'
+    transform_project(:console, 'ruby.console.csproj') do |contents|
+      if IronRuby.is_merlin?
+        replace_output_path contents, '..\..\..\Bin\Debug\\', '..\..\build\debug\\'
+        replace_output_path contents, '..\..\..\Bin\Release\\', '..\..\build\release\\'
+        replace_output_path contents, '..\..\..\Bin\Silverlight Debug\\', '..\..\build\silverlight debug\\'
+        replace_output_path contents, '..\..\..\Bin\Silverlight Release\\', '..\..\build\silverlight release\\'
+
+        replace_post_build_event contents, 'copy $(ProjectDir)..\merlin_ir.exe.config $(TargetDir)ir.exe.config',
+                                           'copy $(ProjectDir)..\..\external_ir.exe.config $(TargetDir)ir.exe.config'
+      else
+        replace_output_path contents, '..\..\build\debug\\', '..\..\..\Bin\Debug\\'
+        replace_output_path contents, '..\..\build\release\\', '..\..\..\Bin\Release\\'
+        replace_output_path contents, '..\..\build\silverlight debug', '..\..\..\Bin\Silverlight Debug\\'
+        replace_output_path contents, '..\..\build\silverlight release', '..\..\..\Bin\Silverlight Release\\'
+
+        replace_post_build_event contents, 'copy $(ProjectDir)..\..\external_ir.exe.config $(TargetDir)ir.exe.config',
+                                           'copy $(ProjectDir)..\merlin_ir.exe.config $(TargetDir)ir.exe.config'
+      end
+    end
     transform_project :test_runner, 'ironruby.tests.csproj'
     transform_project :scanner, 'ironruby.libraries.scanner.csproj'
   end
@@ -186,29 +203,6 @@
 
 # Compilation tasks
 
-desc "generate ir.cmd"
-task :make_ir_cmd => [:clean_build] do
-  ruby_exe_paths = UserEnvironment.find_executable 'ruby.exe'
-
-  if ruby_exe_paths.length == 1
-    if !IronRuby.is_merlin?
-      IronRuby.source_context do
-        lib_paths = []
-        lib_paths << get_source_dir(:libs)
-        lib_paths << Pathname.new(ruby_exe_paths.first + '\..\lib\ruby\site_ruby\1.8').expand_path
-        lib_paths << Pathname.new(ruby_exe_paths.first + '\..\lib\ruby\1.8').expand_path
-        ir_path = build_path + '\ir.exe '
-
-        File.open(build_path + '\ir.cmd', 'w+') do |f|
-          f.write "@echo off\n#{ir_path} -AI #{lib_paths.join(';')} %*"
-        end
-      end
-    end
-  else
-    raise ArgumentError.new("Found more than one version of MRI on your path: #{ruby_exe_paths.join(", ")}")
-  end
-end
-
 desc "clean build directory"
 task :clean_build => [:happy] do
   IronRuby.source_context do
@@ -220,8 +214,7 @@
 desc "compile DLR (Microsoft.Scripting.dll and Microsoft.Scripting.Core.dll)"
 task :compile_dlr => [:clean_build] do
   IronRuby.source_context do
-    resources = { Pathname.new('Microsoft.Scripting.txt') => Pathname.new('Microsoft.Scripting.Core.resources') }
-    compile :dlr_core, :references => ['!System.dll', '!System.Configuration.dll'], :switches => ['target:library', 'define:DLR'], :resources => resources, :output => 'Microsoft.Scripting.Core.dll'
+    compile :dlr_core, :references => ['!System.dll', '!System.Configuration.dll'], :switches => ['target:library', 'define:MICROSOFT_SCRIPTING_CORE'], :output => 'Microsoft.Scripting.Core.dll'
     resources = { Pathname.new('math') + 'MathResources.resx' => Pathname.new('Microsoft.Scripting.Math.MathResources.resources') }
     compile :dlr_libs, :references => ['Microsoft.Scripting.Core.dll', '!System.dll'], :switches => ['target:library'], :resources => resources, :output => 'Microsoft.Scripting.dll'
   end
@@ -249,9 +242,11 @@
 end
 
 desc "compile just the IronRuby console"
-task :compile_console => [:make_ir_cmd,:compile_libraries] do
+task :compile_console => [:compile_libraries] do
   IronRuby.source_context do
     compile :console, :references => ['Microsoft.Scripting.Core.dll', 'Microsoft.Scripting.dll', 'IronRuby.dll'], :output => IRONRUBY_COMPILER
+    config = IronRuby.is_merlin? ? 'merlin' : 'external'
+    system %Q{copy "#{get_source_dir(:root)}\\#{config}_ir.exe.config" "#{build_path}\\ir.exe.config"}
   end
 end
 
@@ -287,7 +282,7 @@
   IronRuby.source_context do
     get_source_dir(:tests).filtered_subdirs.each do |dir|
       chdir(dir) {
-        dir.glob('test_*.rb').each { |file| exec_net "\"#{build_path + IRONRUBY_BINARY}\" \"#{file}\"" }
+        dir.glob('test_*.rb').each { |file| exec_net "\"#{build_path + IRONRUBY_COMPILER}\" \"#{file}\"" }
       }
     end
   end
@@ -306,7 +301,7 @@
 task :specs do
   IronRuby.source_context do
     chdir(get_source_dir(:tests) + 'specs') {
-      exec_net "\"#{Environment.build + IRONRUBY_BINARY}\" mspec.rb"
+      exec_net "\"#{Environment.build + IRONRUBY_COMPILER}\" mspec.rb"
     }
   end
 end
@@ -325,7 +320,7 @@
   task :dual => [:testhappy] do
     IronRuby.source_context do
       rake_output_message "Ruby\n"
-      invoke_mspec(UserEnvironment.mri)
+      invoke_mspec(UserEnvironment.mri_binary)
       rake_output_message "IronRuby\n"
       invoke_mspec(path_to_ir)
       exit
@@ -370,7 +365,7 @@
 end
 
 def path_to_ir
-  build_path + IRONRUBY_BINARY
+  (build_path + IRONRUBY_COMPILER).gsub '\\', '/'
 end
 
 def extract_reporter(reporter)
@@ -405,7 +400,7 @@
     reporter,tag  = extract_reporter(reporter)
 
     chdir(get_source_dir(:tests) +'util'){
-      cmd =  "#{UserEnvironment.mri} #{UserEnvironment.mspec}/bin/mspec #{tag || 'ci'} -t #{path_to_ruby.join(" ")} -B #{UserEnvironment.config} #{run_spec} #{reporter}"
+      cmd =  "#{UserEnvironment.mri_binary} #{UserEnvironment.mspec}/bin/mspec #{tag || 'ci'} -t #{path_to_ruby.join(" ")} -B #{UserEnvironment.config} #{run_spec} #{reporter}"
       exec_net cmd
     }
   end
@@ -637,7 +632,7 @@
 task :ruby do
   begin
     old_verbose,$VERBOSE = $VERBOSE,nil
-    $ruby_imp = [UserEnvironment.mri]
+    $ruby_imp = [UserEnvironment.mri_binary] 
     ARGV = [ARGV[0],*ARGV[2..-1]]
   ensure
     $VERBOSE = old_verbose
@@ -646,7 +641,7 @@
 
 task :ruby_imp do
   IronRuby.source_context do
-    $ruby_imp ||= [path_to_ir, '-T "-X:Interpret"']
+    $ruby_imp ||= %Q{#{path_to_ir} -T "-X:Interpret"}
   end
 end
 
@@ -654,13 +649,27 @@
 task :peverify do
   begin
     old_verbose, $VERBOSE = $VERBOSE, nil
-    IronRuby.source_context {$ruby_imp ||= [path_to_ir, '-T "-X:SaveAssemblies"'] }
+    IronRuby.source_context {$ruby_imp ||= %Q{#{path_to_ir} -T "-X:SaveAssemblies"} }
     ARGV = [ARGV[0], *ARGV[2..-1]]
   ensure
     $VERBOSE = old_verbose
   end
 end
 
+desc "Generate an IronRuby binary redist package from the layout"
+task :package do
+  system %Q{copy "#{ENV['MERLIN_ROOT']}\\Languages\\Ruby\\ir.exe.config" "c:\\ironruby\\bin\\ir.exe.config"}
+  system %Q{copy "#{ENV['MERLIN_ROOT']}\\bin\\release\\ir.exe" c:\\ironruby\\bin\\}
+  system %Q{copy "#{ENV['MERLIN_ROOT']}\\Languages\\Ruby\\ir.exe.config" c:\\ironruby\\bin\\}
+  system %Q{copy "#{ENV['MERLIN_ROOT']}\\bin\\release\\IronRuby*.dll" c:\\ironruby\\bin\\}
+  system %Q{copy "#{ENV['MERLIN_ROOT']}\\bin\\release\\Microsoft.Scripting.Core.dll" c:\\ironruby\\bin\\}
+  system %Q{copy "#{ENV['MERLIN_ROOT']}\\bin\\release\\Microsoft.Scripting.dll" c:\\ironruby\\bin\\}
+  system %Q{del "#{ENV['TEMP']}\\ironruby.7z"}
+  system %Q{"#{ENV['PROGRAM_FILES_32']}/7-Zip/7z.exe" a -bd -t7z -mx9 "#{ENV['TEMP']}\\ironruby.7z" "c:\\ironruby\\"}
+  system %Q{"#{ENV['PROGRAM_FILES_32']}/7-Zip/7z.exe" a -bd -tzip -mx9 "c:\\ironruby.zip" "c:\\ironruby\\"}
+  system %Q{copy /b /Y "#{ENV['PROGRAM_FILES_32']}\\7-Zip\\7zSD.sfx" + "#{ENV['MERLIN_ROOT']}\\Languages\\Ruby\\sfx_config.txt" + "#{ENV['TEMP']}\\ironruby.7z" "c:\\ironruby.exe"}
+end
+
 task :default => [:happy] do
   Rake.application.options.show_tasks = true
   Rake.application.options.show_task_pattern = Regexp.new('.')
===================================================================
add: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/sfx_config.txt
File: sfx_config.txt
===================================================================
--- [no source file]
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/sfx_config.txt;alpha-3
@@ -1,0 +1,8 @@
+;!@Install@!UTF-8!
+Title="IronRuby"
+ExtractPathText="Installation path:"
+BeginPrompt="IronRuby Alpha Installer"
+InstallPath="c:\\ironruby"
+GUIMode="2"
+GUIFlags="64"
+;!@InstallEnd@!
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Console/Ruby.Console.csproj;C456261
File: Ruby.Console.csproj
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Console/Ruby.Console.csproj;C456261  (server)    8/6/2008 2:43 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Console/Ruby.Console.csproj;alpha-3
@@ -66,4 +66,7 @@
   <Target Name="AfterBuild">
   </Target>
   -->
+  <PropertyGroup>
+    <PostBuildEvent>copy $(ProjectDir)..\merlin_ir.exe.config $(TargetDir)ir.exe.config</PostBuildEvent>
+  </PropertyGroup>
 </Project>
\ No newline at end of file
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs;C518603
File: FileOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs;C518603  (server)    8/7/2008 9:11 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs;alpha-3
@@ -932,7 +932,7 @@
             [RubyMethod("executable_real?")]
             public static bool IsExecutable(FileSystemInfo/*!*/ self) {
                 // TODO: Fix
-                return self.Extension.Equals("exe", StringComparison.InvariantCulture);
+                return self.Extension.Equals(".exe", StringComparison.InvariantCulture);
             }
 
             [RubyMethod("file?")]
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Ruby.csproj;C520315
File: Ruby.csproj
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Ruby.csproj;C520315  (server)    8/6/2008 2:43 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Ruby.csproj;alpha-3
@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30718</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{7F6984B4-EE6D-4E6F-ABB1-E210D7DC4FDD}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -75,6 +75,7 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>$(SilverlightSdkPath)\mscorlib.dll</HintPath>
     </Reference>
+    <Reference Include="System.configuration" />
     <Reference Include="System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" Condition=" '$(SilverlightBuild)' == 'true' ">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>$(SilverlightSdkPath)\System.Net.dll</HintPath>
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyEngineOptions.cs;C515499
File: RubyEngineOptions.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyEngineOptions.cs;C515499  (server)    8/6/2008 2:43 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyEngineOptions.cs;alpha-3
@@ -15,9 +15,8 @@
 
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-using System.Collections.ObjectModel;
 
 namespace Ruby {
 
@@ -57,6 +56,7 @@
         public RubyOptions(IDictionary<string, object> options)
             : base(options) {
             _arguments = GetStringCollectionOption(options, "Arguments") ?? EmptyStringCollection;
+
             _mainFile = GetOption(options, "MainFile", (string)null);
             _showWarnings = GetOption(options, "ShowWarnings", false);
             _enableTracing = GetOption(options, "EnableTracing", false);
@@ -64,4 +64,4 @@
             _loadFromDisk = GetOption(options, "LoadFromDisk", false);
         }
     }
-}
\ No newline at end of file
+}
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyOptionsParser.cs;C515499
File: RubyOptionsParser.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyOptionsParser.cs;C515499  (server)    8/6/2008 2:43 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyOptionsParser.cs;alpha-3
@@ -27,6 +27,7 @@
 using Ruby.Runtime;
 using System.Text;
 using System.Collections.Generic;
+using System.Configuration;
 
 namespace Ruby.Hosting {
 
@@ -77,6 +78,10 @@
                 case "-load":
                     LanguageSetup.Options["LoadFromDisk"] = RuntimeHelpers.True;
                     break;
+
+                case "-v":
+                    // TODO: print version number
+                    break;
                 
                 default:
                     base.ParseArgument(arg);
@@ -88,6 +93,17 @@
             }
         }
 
+#if !SILVERLIGHT
+        protected override void BeforeParse() {
+            var defaultLoadPaths = (ConfigurationManager.AppSettings["LibPaths"] ?? String.Empty).Split(';');
+            string exePath = Path.GetDirectoryName(new Uri(Assembly.GetEntryAssembly().CodeBase).AbsolutePath);
+            for (int i = 0; i < defaultLoadPaths.Length; ++i)
+                defaultLoadPaths[i] = Path.Combine(exePath, defaultLoadPaths[i]);
+
+            _appendLoadPaths.AddRange(defaultLoadPaths);
+        }
+#endif
+
         protected override void AfterParse() {
             if (_loadPaths.Count > 0 || _appendLoadPaths.Count > 0) {
                 object obj;
@@ -116,4 +132,4 @@
             options = ArrayUtils.Concatenate(rubyOptions, standardOptions);
         }
     }
-}
\ No newline at end of file
+}
===================================================================
