summaryrefslogtreecommitdiff
path: root/test/mkmf
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 02:53:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 02:53:47 +0000
commit76d8cc33f9ef4f8d17bb8516a26e1d41e10cbc0f (patch)
tree676df4badac694dc101ab52cccb6dd73202cf86f /test/mkmf
parentc0035ed35141b2675ec0f395b3a214f967ad7190 (diff)
mkmf.rb: defer use of instance variable
* lib/mkmf.rb (MakeMakefile#dir_config, MakeMakefile#_libdir_basename): defer use of instance variable until needed. [Bug #8074] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf')
-rw-r--r--test/mkmf/test_config.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/mkmf/test_config.rb b/test/mkmf/test_config.rb
new file mode 100644
index 0000000..c0b2355
--- /dev/null
+++ b/test/mkmf/test_config.rb
@@ -0,0 +1,14 @@
+require 'test/unit'
+require 'mkmf'
+require_relative '../ruby/envutil'
+
+class TestMkmf
+ class TestConfig < Test::Unit::TestCase
+ def test_dir_config
+ bug8074 = '[Bug #8074]'
+ assert_separately %w[-rmkmf - -- --with-foo-dir=/test/foo], %{
+ assert_equal(%w[/test/foo/include /test/foo/lib], dir_config("foo"), #{bug8074.dump})
+ }
+ end
+ end
+end