=== modified file 'lib/inline.rb' --- old/lib/inline.rb 2007-11-29 22:54:39 +0000 +++ new/lib/inline.rb 2007-11-29 23:08:01 +0000 @@ -56,7 +56,7 @@ WINDOZE = /win32/ =~ RUBY_PLATFORM DEV_NULL = (WINDOZE ? 'nul' : '/dev/null') RAKE = (WINDOZE ? 'rake.cmd' : 'rake') - GEM = (WINDOZE ? 'gem.cmd' : 'gem') + GEM = (WINDOZE ? 'gem.bat' : 'gem') $stderr.puts "RubyInline v #{VERSION}" if $DEBUG @@ -65,6 +65,10 @@ def self.rootdir env = ENV['INLINEDIR'] || ENV['HOME'] + # in case both INLINEDIR and HOME aren't defined, and under Windows + # default to HOMEDRIVE + HOMEPATH values + env = ENV['HOMEDRIVE'] + ENV['HOMEPATH'] if env.nil? and WINDOZE + if env.nil? then $stderr.puts "Define INLINEDIR or HOME in your environment and try again" exit 1 @@ -402,7 +406,11 @@ raise CompilationError, "error executing #{cmd}: #{$?}\nRenamed #{src_name} to #{bad_src_name}" end - if WINDOZE then + # NOTE: manifest embedding is only required when using VC8 ruby + # build or compiler. + # Errors from this point should be ignored if Config::CONFIG['arch'] + # (RUBY_PLATFORM) matches 'i386-mswin32_80' + if RUBY_PLATFORM == 'i386-mswin32_80' then Dir.chdir Inline.directory do cmd = "mt /manifest lib.so.manifest /outputresource:so.dll;#2" $stderr.puts "Embedding manifest with '#{cmd}'" if $DEBUG === modified file 'test/test_inline.rb' --- old/test/test_inline.rb 2007-11-29 22:54:39 +0000 +++ new/test/test_inline.rb 2007-11-29 23:07:32 +0000 @@ -6,6 +6,7 @@ require 'tempfile' require 'tmpdir' require 'test/unit' +require 'fileutils' unless defined?(::FileUtils) File.umask(0) @@ -636,11 +637,14 @@ tempfile.write($test_module_code2) tempfile.flush tempfile.rewind - `cp #{tempfile.path} #{tempfile.path}.rb` + + FileUtils.cp tempfile.path, "#{tempfile.path}.rb" + require "#{tempfile.path}.rb" assert_equal(12, fb.twelve_instance) assert_equal(12, Foo::Bar.twelve_class) - `rm "#{tempfile.path}.rb"` + + FileUtils.rm "#{tempfile.path}.rb" end def test_argument_check_good