1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/mkmf.rb: Use MakeMakefile's rm_f to avoid conflict with Rake or

FileUtils.
* test/ruby/test_module.rb:  Hide MakeMakefile's inclusion in Object


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-11-30 00:57:24 +00:00
parent 434a5f93ad
commit 8b7ecdc11e
5 changed files with 1909 additions and 1861 deletions

View file

@ -1,3 +1,9 @@
Wed Nov 30 08:57:07 2011 Eric Hodel <drbrain@segment7.net>
* lib/mkmf.rb: Use MakeMakefile's rm_f to avoid conflict with Rake or
FileUtils.
* test/ruby/test_module.rb: Hide MakeMakefile's inclusion in Object
Wed Nov 30 09:12:43 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars

View file

@ -147,7 +147,7 @@ def extmake(target)
remove_const(:MAKEFILE_CONFIG)
const_set(:MAKEFILE_CONFIG, mkconfig)
}
Object.class_eval {
MakeMakefile.class_eval {
remove_const(:CONFIG)
const_set(:CONFIG, mkconfig)
}
@ -240,7 +240,7 @@ def extmake(target)
remove_const(:MAKEFILE_CONFIG)
const_set(:MAKEFILE_CONFIG, mkconfig0)
}
Object.class_eval {
MakeMakefile.class_eval {
remove_const(:CONFIG)
const_set(:CONFIG, mkconfig0)
}

File diff suppressed because it is too large Load diff

View file

@ -78,7 +78,7 @@ class TestMkmf < Test::Unit::TestCase
remove_const(:MAKEFILE_CONFIG)
const_set(:MAKEFILE_CONFIG, mkconfig)
}
Object.class_eval {
MakeMakefile.class_eval {
remove_const(:CONFIG)
const_set(:CONFIG, mkconfig)
}
@ -101,7 +101,7 @@ class TestMkmf < Test::Unit::TestCase
remove_const(:MAKEFILE_CONFIG)
const_set(:MAKEFILE_CONFIG, mkconfig0)
}
Object.class_eval {
MakeMakefile.class_eval {
remove_const(:CONFIG)
const_set(:CONFIG, mkconfig0)
}

View file

@ -83,6 +83,10 @@ class TestModule < Test::Unit::TestCase
list.reject {|c| c.to_s.start_with?("MiniTest") }
end
def remove_mkmf_mixins(list)
list.reject {|c| c.to_s.start_with?("MakeMakefile") }
end
module Mixin
MIXIN = 1
def mixin
@ -221,9 +225,9 @@ class TestModule < Test::Unit::TestCase
assert_equal([Mixin], Mixin.ancestors)
assert_equal([Object, Kernel, BasicObject],
remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.ancestors)))))
remove_mkmf_mixins(remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.ancestors))))))
assert_equal([String, Comparable, Object, Kernel, BasicObject],
remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.ancestors)))))
remove_mkmf_mixins(remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.ancestors))))))
end
CLASS_EVAL = 2
@ -281,9 +285,9 @@ class TestModule < Test::Unit::TestCase
assert_equal([], Mixin.included_modules)
assert_equal([Mixin], User.included_modules)
assert_equal([Kernel],
remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.included_modules)))))
remove_mkmf_mixins(remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.included_modules))))))
assert_equal([Comparable, Kernel],
remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.included_modules)))))
remove_mkmf_mixins(remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.included_modules))))))
end
def test_instance_methods