diff options
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 7bfeb48d3c..b1087c9f59 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -922,7 +922,7 @@ dependencies: [] end def test_self_load_relative - open 'a-2.gemspec', 'w' do |io| + File.open 'a-2.gemspec', 'w' do |io| io.write @a2.to_ruby_for_cache end @@ -1114,7 +1114,7 @@ dependencies: [] end def test_self_remove_spec_removed - open @a1.spec_file, 'w' do |io| + File.open @a1.spec_file, 'w' do |io| io.write @a1.to_ruby end @@ -1366,13 +1366,13 @@ dependencies: [] assert_empty @ext.build_args - open @ext.build_info_file, 'w' do |io| + File.open @ext.build_info_file, 'w' do |io| io.puts end assert_empty @ext.build_args - open @ext.build_info_file, 'w' do |io| + File.open @ext.build_info_file, 'w' do |io| io.puts '--with-foo-dir=wherever' end @@ -1388,9 +1388,9 @@ dependencies: [] extconf_rb = File.join @ext.gem_dir, @ext.extensions.first FileUtils.mkdir_p File.dirname extconf_rb - open extconf_rb, 'w' do |f| + File.open extconf_rb, 'w' do |f| f.write <<-'RUBY' - open 'Makefile', 'w' do |f| + File.open 'Makefile', 'w' do |f| f.puts "clean:\n\techo clean" f.puts "default:\n\techo built" f.puts "install:\n\techo installed" @@ -1438,9 +1438,9 @@ dependencies: [] extconf_rb = File.join spec.gem_dir, spec.extensions.first FileUtils.mkdir_p File.dirname extconf_rb - open extconf_rb, 'w' do |f| + File.open extconf_rb, 'w' do |f| f.write <<-'RUBY' - open 'Makefile', 'w' do |f| + File.open 'Makefile', 'w' do |f| f.puts "default:\n\techo built" f.puts "install:\n\techo installed" end @@ -1464,7 +1464,7 @@ dependencies: [] def test_build_extensions_extensions_dir_unwritable skip 'chmod not supported' if Gem.win_platform? - skip 'skipped in root privilege' if Process.uid == 0 + skip 'skipped in root privilege' if Process.uid.zero? ext_spec @@ -1473,9 +1473,9 @@ dependencies: [] extconf_rb = File.join @ext.gem_dir, @ext.extensions.first FileUtils.mkdir_p File.dirname extconf_rb - open extconf_rb, 'w' do |f| + File.open extconf_rb, 'w' do |f| f.write <<-'RUBY' - open 'Makefile', 'w' do |f| + File.open 'Makefile', 'w' do |f| f.puts "clean:\n\techo clean" f.puts "default:\n\techo built" f.puts "install:\n\techo installed" @@ -1490,7 +1490,7 @@ dependencies: [] @ext.build_extensions refute_path_exists @ext.extension_dir ensure - unless ($DEBUG or win_platform? or Process.uid == 0) then + unless ($DEBUG or win_platform? or Process.uid.zero?) then FileUtils.chmod 0755, File.join(@ext.base_dir, 'extensions') FileUtils.chmod 0755, @ext.base_dir end @@ -1506,9 +1506,9 @@ dependencies: [] extconf_rb = File.join @ext.gem_dir, @ext.extensions.first FileUtils.mkdir_p File.dirname extconf_rb - open extconf_rb, 'w' do |f| + File.open extconf_rb, 'w' do |f| f.write <<-'RUBY' - open 'Makefile', 'w' do |f| + File.open 'Makefile', 'w' do |f| f.puts "clean:\n\techo clean" f.puts "default:\n\techo built" f.puts "install:\n\techo installed" @@ -1555,9 +1555,9 @@ dependencies: [] extconf_rb = File.join @ext.gem_dir, @ext.extensions.first FileUtils.mkdir_p File.dirname extconf_rb - open extconf_rb, 'w' do |f| + File.open extconf_rb, 'w' do |f| f.write <<-'RUBY' - open 'Makefile', 'w' do |f| + File.open 'Makefile', 'w' do |f| f.puts "clean:\n\techo clean" f.puts "default:\n\techo built" f.puts "install:\n\techo installed" @@ -3422,9 +3422,9 @@ end extconf_rb = File.join @ext.gem_dir, @ext.extensions.first FileUtils.mkdir_p File.dirname extconf_rb - open extconf_rb, 'w' do |f| + File.open extconf_rb, 'w' do |f| f.write <<-'RUBY' - open 'Makefile', 'w' do |f| + File.open 'Makefile', 'w' do |f| f.puts "clean:\n\techo clean" f.puts "default:\n\techo built" f.puts "install:\n\techo installed" |