ruby-changes:66186
From: Hiroshi <ko1@a...>
Date: Wed, 12 May 2021 17:25:29 +0900 (JST)
Subject: [ruby-changes:66186] bef49e6e8d (master): [rubygems/rubygems] Added begin-end block for java platform
https://git.ruby-lang.org/ruby.git/commit/?id=bef49e6e8d From bef49e6e8d03a34b95f3e69ef7d23395027a44d2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Tue, 11 May 2021 21:00:54 +0900 Subject: [rubygems/rubygems] Added begin-end block for java platform Because pend of test-unit raises exception. https://github.com/rubygems/rubygems/commit/b5e2d0855a --- test/rubygems/test_gem_installer.rb | 70 +++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 1619a30..1180e3a 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -1525,50 +1525,52 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L1525 def test_install_extension_flat skip "extensions don't quite work on jruby" if Gem.java_platform? - @spec = setup_base_spec - @spec.require_paths = ["."] + begin + @spec = setup_base_spec + @spec.require_paths = ["."] - @spec.extensions << "extconf.rb" + @spec.extensions << "extconf.rb" - write_file File.join(@tempdir, "extconf.rb") do |io| - io.write <<-RUBY - require "mkmf" + write_file File.join(@tempdir, "extconf.rb") do |io| + io.write <<-RUBY + require "mkmf" - CONFIG['CC'] = '$(TOUCH) $@ ||' - CONFIG['LDSHARED'] = '$(TOUCH) $@ ||' - $ruby = '#{Gem.ruby}' + CONFIG['CC'] = '$(TOUCH) $@ ||' + CONFIG['LDSHARED'] = '$(TOUCH) $@ ||' + $ruby = '#{Gem.ruby}' - create_makefile("#{@spec.name}") - RUBY - end + create_makefile("#{@spec.name}") + RUBY + end - # empty depend file for no auto dependencies - @spec.files += %W[depend #{@spec.name}.c].each do |file| - write_file File.join(@tempdir, file) - end + # empty depend file for no auto dependencies + @spec.files += %W[depend #{@spec.name}.c].each do |file| + write_file File.join(@tempdir, file) + end - so = File.join(@spec.gem_dir, "#{@spec.name}.#{RbConfig::CONFIG["DLEXT"]}") - assert_path_not_exist so - use_ui @ui do - path = Gem::Package.build @spec + so = File.join(@spec.gem_dir, "#{@spec.name}.#{RbConfig::CONFIG["DLEXT"]}") + assert_path_not_exist so + use_ui @ui do + path = Gem::Package.build @spec - installer = Gem::Installer.at path - installer.install - end - assert_path_exist so - rescue - puts '-' * 78 - puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile') - puts '-' * 78 + installer = Gem::Installer.at path + installer.install + end + assert_path_exist so + rescue + puts '-' * 78 + puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile') + puts '-' * 78 - path = File.join(@gemhome, 'gems', 'a-2', 'gem_make.out') + path = File.join(@gemhome, 'gems', 'a-2', 'gem_make.out') - if File.exist?(path) - puts File.read(path) - puts '-' * 78 - end + if File.exist?(path) + puts File.read(path) + puts '-' * 78 + end - raise + raise + end end def test_installation_satisfies_dependency_eh -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/