ruby-changes:33663
From: akr <ko1@a...>
Date: Tue, 29 Apr 2014 14:19:45 +0900 (JST)
Subject: [ruby-changes:33663] akr:r45744 (trunk): * (lib/tmpdir.rb): Rescue LoadError on etc.so for miniruby.
akr 2014-04-29 14:19:38 +0900 (Tue, 29 Apr 2014) New Revision: 45744 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45744 Log: * (lib/tmpdir.rb): Rescue LoadError on etc.so for miniruby. Revert r45707, r45711, r45717. Modified files: trunk/ChangeLog trunk/bootstraptest/test_io.rb trunk/lib/mkmf.rb trunk/lib/tmpdir.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 45743) +++ ChangeLog (revision 45744) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Apr 29 14:17:57 2014 Tanaka Akira <akr@f...> + + * (lib/tmpdir.rb): Rescue LoadError on etc.so for miniruby. + Revert r45707, r45711, r45717. + Tue Apr 29 12:50:02 2014 Tanaka Akira <akr@f...> * lib/fileutils.rb: Don't need to define fu_get_gid and fu_get_gid in Index: bootstraptest/test_io.rb =================================================================== --- bootstraptest/test_io.rb (revision 45743) +++ bootstraptest/test_io.rb (revision 45744) @@ -42,7 +42,6 @@ assert_finish 1, %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_io.rb#L42 } assert_equal 'ok', %q{ - $" << 'etc.so' require 'tmpdir' begin tmpname = "#{Dir.tmpdir}/ruby-btest-#{$$}-#{rand(0x100000000).to_s(36)}" @@ -59,7 +58,6 @@ assert_equal 'ok', %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_io.rb#L58 } assert_equal 'ok', %q{ - $" << 'etc.so' require 'tmpdir' begin tmpname = "#{Dir.tmpdir}/ruby-btest-#{$$}-#{rand(0x100000000).to_s(36)}" Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 45743) +++ lib/mkmf.rb (revision 45744) @@ -528,11 +528,6 @@ MSG https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L528 def try_link0(src, opt="", *opts, &b) # :nodoc: cmd = link_command("", opt) if $universal - begin - require 'etc' - rescue LoadError - $" << 'etc.so' - end require 'tmpdir' Dir.mktmpdir("mkmf_", oldtmpdir = ENV["TMPDIR"]) do |tmpdir| begin Index: lib/tmpdir.rb =================================================================== --- lib/tmpdir.rb (revision 45743) +++ lib/tmpdir.rb (revision 45744) @@ -5,7 +5,10 @@ https://github.com/ruby/ruby/blob/trunk/lib/tmpdir.rb#L5 # require 'fileutils' -require 'etc.so' +begin + require 'etc.so' +rescue LoadError # rescue LoadError for miniruby +end class Dir -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/