summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-29 05:19:38 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-29 05:19:38 +0000
commit07f2563745afca2f7e4fdccba483df4cad0cc9e9 (patch)
tree374c1cf4058d2f1ffda2878dd5a2ae273877b7c3
parent17a4a9b99327e44e2ddf22c060a2c6802441f91e (diff)
* (lib/tmpdir.rb): Rescue LoadError on etc.so for miniruby.
Revert r45707, r45711, r45717. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--bootstraptest/test_io.rb2
-rw-r--r--lib/mkmf.rb5
-rw-r--r--lib/tmpdir.rb5
4 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 64eac6c..f29fc5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Apr 29 14:17:57 2014 Tanaka Akira <akr@fsij.org>
+
+ * (lib/tmpdir.rb): Rescue LoadError on etc.so for miniruby.
+ Revert r45707, r45711, r45717.
+
Tue Apr 29 12:50:02 2014 Tanaka Akira <akr@fsij.org>
* lib/fileutils.rb: Don't need to define fu_get_gid and fu_get_gid in
diff --git a/bootstraptest/test_io.rb b/bootstraptest/test_io.rb
index 881431c..f7360f3 100644
--- a/bootstraptest/test_io.rb
+++ b/bootstraptest/test_io.rb
@@ -42,7 +42,6 @@ assert_finish 1, %q{
}
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{
}
assert_equal 'ok', %q{
- $" << 'etc.so'
require 'tmpdir'
begin
tmpname = "#{Dir.tmpdir}/ruby-btest-#{$$}-#{rand(0x100000000).to_s(36)}"
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index e0ac0d4..a8553fc 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -528,11 +528,6 @@ MSG
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
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb
index a3bb9f4..d60edd5 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -5,7 +5,10 @@
#
require 'fileutils'
-require 'etc.so'
+begin
+ require 'etc.so'
+rescue LoadError # rescue LoadError for miniruby
+end
class Dir