@@ -1524,50 +1524,52 @@ def test_install_extension_and_script
15241524 def test_install_extension_flat
15251525 pend "extensions don't quite work on jruby" if Gem . java_platform?
15261526
1527- @spec = setup_base_spec
1528- @spec . require_paths = [ "." ]
1527+ begin
1528+ @spec = setup_base_spec
1529+ @spec . require_paths = [ "." ]
15291530
1530- @spec . extensions << "extconf.rb"
1531+ @spec . extensions << "extconf.rb"
15311532
1532- write_file File . join ( @tempdir , "extconf.rb" ) do |io |
1533- io . write <<-RUBY
1534- require "mkmf"
1533+ write_file File . join ( @tempdir , "extconf.rb" ) do |io |
1534+ io . write <<-RUBY
1535+ require "mkmf"
15351536
1536- CONFIG['CC'] = '$(TOUCH) $@ ||'
1537- CONFIG['LDSHARED'] = '$(TOUCH) $@ ||'
1538- $ruby = '#{ Gem . ruby } '
1537+ CONFIG['CC'] = '$(TOUCH) $@ ||'
1538+ CONFIG['LDSHARED'] = '$(TOUCH) $@ ||'
1539+ $ruby = '#{ Gem . ruby } '
15391540
1540- create_makefile("#{ @spec . name } ")
1541- RUBY
1542- end
1541+ create_makefile("#{ @spec . name } ")
1542+ RUBY
1543+ end
15431544
1544- # empty depend file for no auto dependencies
1545- @spec . files += %W[ depend #{ @spec . name } .c] . each do |file |
1546- write_file File . join ( @tempdir , file )
1547- end
1545+ # empty depend file for no auto dependencies
1546+ @spec . files += %W[ depend #{ @spec . name } .c] . each do |file |
1547+ write_file File . join ( @tempdir , file )
1548+ end
15481549
1549- so = File . join ( @spec . gem_dir , "#{ @spec . name } .#{ RbConfig ::CONFIG [ "DLEXT" ] } " )
1550- assert_path_not_exist so
1551- use_ui @ui do
1552- path = Gem ::Package . build @spec
1550+ so = File . join ( @spec . gem_dir , "#{ @spec . name } .#{ RbConfig ::CONFIG [ "DLEXT" ] } " )
1551+ assert_path_not_exist so
1552+ use_ui @ui do
1553+ path = Gem ::Package . build @spec
15531554
1554- installer = Gem ::Installer . at path
1555- installer . install
1556- end
1557- assert_path_exist so
1558- rescue
1559- puts '-' * 78
1560- puts File . read File . join ( @gemhome , 'gems' , 'a-2' , 'Makefile' )
1561- puts '-' * 78
1555+ installer = Gem ::Installer . at path
1556+ installer . install
1557+ end
1558+ assert_path_exist so
1559+ rescue
1560+ puts '-' * 78
1561+ puts File . read File . join ( @gemhome , 'gems' , 'a-2' , 'Makefile' )
1562+ puts '-' * 78
15621563
1563- path = File . join ( @gemhome , 'gems' , 'a-2' , 'gem_make.out' )
1564+ path = File . join ( @gemhome , 'gems' , 'a-2' , 'gem_make.out' )
15641565
1565- if File . exist? ( path )
1566- puts File . read ( path )
1567- puts '-' * 78
1568- end
1566+ if File . exist? ( path )
1567+ puts File . read ( path )
1568+ puts '-' * 78
1569+ end
15691570
1570- raise
1571+ raise
1572+ end
15711573 end
15721574
15731575 def test_installation_satisfies_dependency_eh
0 commit comments