rubygems-update 3.4.20 → 3.4.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -0
  3. data/Manifest.txt +6 -0
  4. data/bundler/CHANGELOG.md +55 -3
  5. data/bundler/README.md +1 -2
  6. data/bundler/lib/bundler/build_metadata.rb +3 -3
  7. data/bundler/lib/bundler/cli/check.rb +1 -1
  8. data/bundler/lib/bundler/cli/gem.rb +4 -3
  9. data/bundler/lib/bundler/cli/install.rb +2 -2
  10. data/bundler/lib/bundler/cli/lock.rb +26 -23
  11. data/bundler/lib/bundler/cli/open.rb +5 -7
  12. data/bundler/lib/bundler/definition.rb +43 -26
  13. data/bundler/lib/bundler/endpoint_specification.rb +1 -1
  14. data/bundler/lib/bundler/env.rb +2 -2
  15. data/bundler/lib/bundler/errors.rb +15 -0
  16. data/bundler/lib/bundler/gem_helpers.rb +7 -0
  17. data/bundler/lib/bundler/gem_version_promoter.rb +2 -2
  18. data/bundler/lib/bundler/injector.rb +1 -1
  19. data/bundler/lib/bundler/installer/gem_installer.rb +5 -5
  20. data/bundler/lib/bundler/installer/parallel_installer.rb +0 -26
  21. data/bundler/lib/bundler/installer/standalone.rb +13 -6
  22. data/bundler/lib/bundler/lazy_specification.rb +4 -0
  23. data/bundler/lib/bundler/lockfile_parser.rb +29 -24
  24. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  28. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  29. data/bundler/lib/bundler/man/bundle-config.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-exec.1 +2 -2
  33. data/bundler/lib/bundler/man/bundle-exec.1.ronn +2 -3
  34. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  42. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  43. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  45. data/bundler/lib/bundler/man/bundle-plugin.1 +17 -17
  46. data/bundler/lib/bundler/man/bundle-plugin.1.ronn +5 -5
  47. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  50. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  51. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  52. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  53. data/bundler/lib/bundler/man/bundle.1 +1 -1
  54. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  55. data/bundler/lib/bundler/plugin/index.rb +8 -0
  56. data/bundler/lib/bundler/plugin.rb +9 -2
  57. data/bundler/lib/bundler/resolver/package.rb +5 -0
  58. data/bundler/lib/bundler/resolver.rb +27 -7
  59. data/bundler/lib/bundler/ruby_version.rb +8 -1
  60. data/bundler/lib/bundler/rubygems_ext.rb +3 -4
  61. data/bundler/lib/bundler/rubygems_gem_installer.rb +23 -8
  62. data/bundler/lib/bundler/settings.rb +53 -16
  63. data/bundler/lib/bundler/shared_helpers.rb +16 -1
  64. data/bundler/lib/bundler/source/git/git_proxy.rb +21 -4
  65. data/bundler/lib/bundler/source/metadata.rb +1 -1
  66. data/bundler/lib/bundler/spec_set.rb +7 -4
  67. data/bundler/lib/bundler/stub_specification.rb +4 -2
  68. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +6 -2
  69. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  70. data/bundler/lib/bundler/ui/shell.rb +1 -1
  71. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +1 -0
  72. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +21 -9
  73. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
  74. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
  75. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
  76. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  77. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +8 -10
  78. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +15 -4
  79. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +15 -15
  80. data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
  81. data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
  82. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +4 -0
  83. data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +16 -25
  84. data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
  85. data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
  86. data/bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
  87. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
  88. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
  89. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
  90. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +44 -6
  91. data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
  92. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
  93. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +26 -150
  94. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +4 -46
  95. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  96. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -45
  97. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb +49 -0
  98. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
  99. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  100. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  101. data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  102. data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
  103. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  104. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +155 -8
  105. data/bundler/lib/bundler/version.rb +1 -1
  106. data/bundler/lib/bundler/yaml_serializer.rb +12 -8
  107. data/bundler/lib/bundler.rb +0 -8
  108. data/lib/rubygems/basic_specification.rb +1 -1
  109. data/lib/rubygems/command.rb +5 -5
  110. data/lib/rubygems/command_manager.rb +1 -1
  111. data/lib/rubygems/commands/cert_command.rb +3 -3
  112. data/lib/rubygems/commands/check_command.rb +5 -1
  113. data/lib/rubygems/commands/cleanup_command.rb +1 -1
  114. data/lib/rubygems/commands/contents_command.rb +2 -2
  115. data/lib/rubygems/commands/environment_command.rb +2 -2
  116. data/lib/rubygems/commands/help_command.rb +3 -3
  117. data/lib/rubygems/commands/open_command.rb +1 -3
  118. data/lib/rubygems/commands/owner_command.rb +1 -1
  119. data/lib/rubygems/commands/setup_command.rb +10 -10
  120. data/lib/rubygems/commands/specification_command.rb +5 -1
  121. data/lib/rubygems/commands/stale_command.rb +1 -1
  122. data/lib/rubygems/commands/uninstall_command.rb +4 -4
  123. data/lib/rubygems/commands/unpack_command.rb +3 -3
  124. data/lib/rubygems/commands/update_command.rb +4 -4
  125. data/lib/rubygems/commands/yank_command.rb +1 -1
  126. data/lib/rubygems/config_file.rb +63 -16
  127. data/lib/rubygems/core_ext/kernel_gem.rb +1 -1
  128. data/lib/rubygems/core_ext/kernel_require.rb +2 -2
  129. data/lib/rubygems/defaults.rb +6 -2
  130. data/lib/rubygems/dependency_installer.rb +4 -4
  131. data/lib/rubygems/deprecate.rb +2 -1
  132. data/lib/rubygems/doctor.rb +2 -2
  133. data/lib/rubygems/errors.rb +1 -1
  134. data/lib/rubygems/exceptions.rb +1 -1
  135. data/lib/rubygems/ext/builder.rb +5 -4
  136. data/lib/rubygems/ext/cargo_builder.rb +2 -2
  137. data/lib/rubygems/ext/ext_conf_builder.rb +1 -1
  138. data/lib/rubygems/ext/rake_builder.rb +1 -1
  139. data/lib/rubygems/gem_runner.rb +5 -1
  140. data/lib/rubygems/gemcutter_utilities.rb +2 -2
  141. data/lib/rubygems/indexer.rb +1 -1
  142. data/lib/rubygems/install_update_options.rb +1 -1
  143. data/lib/rubygems/installer.rb +15 -20
  144. data/lib/rubygems/local_remote_options.rb +1 -1
  145. data/lib/rubygems/package/digest_io.rb +1 -1
  146. data/lib/rubygems/package/old.rb +1 -1
  147. data/lib/rubygems/package/tar_header.rb +2 -2
  148. data/lib/rubygems/package/tar_reader.rb +9 -2
  149. data/lib/rubygems/package/tar_writer.rb +2 -2
  150. data/lib/rubygems/package.rb +9 -9
  151. data/lib/rubygems/path_support.rb +1 -1
  152. data/lib/rubygems/platform.rb +12 -6
  153. data/lib/rubygems/query_utils.rb +4 -4
  154. data/lib/rubygems/remote_fetcher.rb +12 -4
  155. data/lib/rubygems/request.rb +1 -1
  156. data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
  157. data/lib/rubygems/request_set.rb +2 -1
  158. data/lib/rubygems/requirement.rb +1 -1
  159. data/lib/rubygems/resolver/api_set.rb +2 -1
  160. data/lib/rubygems/resolver/api_specification.rb +1 -1
  161. data/lib/rubygems/resolver.rb +3 -3
  162. data/lib/rubygems/security/signer.rb +10 -2
  163. data/lib/rubygems/security/trust_dir.rb +5 -5
  164. data/lib/rubygems/security.rb +1 -1
  165. data/lib/rubygems/security_option.rb +1 -1
  166. data/lib/rubygems/source/local.rb +2 -1
  167. data/lib/rubygems/source.rb +5 -1
  168. data/lib/rubygems/source_list.rb +1 -1
  169. data/lib/rubygems/spec_fetcher.rb +2 -2
  170. data/lib/rubygems/specification.rb +30 -23
  171. data/lib/rubygems/specification_policy.rb +11 -11
  172. data/lib/rubygems/uninstaller.rb +3 -3
  173. data/lib/rubygems/update_suggestion.rb +1 -1
  174. data/lib/rubygems/user_interaction.rb +2 -2
  175. data/lib/rubygems/util/licenses.rb +48 -0
  176. data/lib/rubygems/util.rb +5 -1
  177. data/lib/rubygems/validator.rb +1 -1
  178. data/lib/rubygems/version.rb +6 -5
  179. data/lib/rubygems/yaml_serializer.rb +93 -0
  180. data/lib/rubygems.rb +9 -9
  181. data/rubygems-update.gemspec +1 -1
  182. data/setup.rb +2 -0
  183. data/test/rubygems/bundler_test_gem.rb +6 -3
  184. data/test/rubygems/helper.rb +29 -21
  185. data/test/rubygems/package/tar_test_case.rb +2 -2
  186. data/test/rubygems/test_gem.rb +51 -26
  187. data/test/rubygems/test_gem_command.rb +3 -1
  188. data/test/rubygems/test_gem_command_manager.rb +6 -6
  189. data/test/rubygems/test_gem_commands_cert_command.rb +23 -23
  190. data/test/rubygems/test_gem_commands_cleanup_command.rb +2 -2
  191. data/test/rubygems/test_gem_commands_environment_command.rb +2 -1
  192. data/test/rubygems/test_gem_commands_exec_command.rb +5 -1
  193. data/test/rubygems/test_gem_commands_install_command.rb +5 -5
  194. data/test/rubygems/test_gem_commands_open_command.rb +5 -2
  195. data/test/rubygems/test_gem_commands_pristine_command.rb +2 -2
  196. data/test/rubygems/test_gem_commands_push_command.rb +7 -6
  197. data/test/rubygems/test_gem_commands_signin_command.rb +8 -8
  198. data/test/rubygems/test_gem_commands_uninstall_command.rb +21 -1
  199. data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
  200. data/test/rubygems/test_gem_config_file.rb +46 -12
  201. data/test/rubygems/test_gem_ext_builder.rb +1 -1
  202. data/test/rubygems/test_gem_ext_cargo_builder.rb +2 -2
  203. data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -5
  204. data/test/rubygems/test_gem_install_update_options.rb +3 -3
  205. data/test/rubygems/test_gem_installer.rb +16 -16
  206. data/test/rubygems/test_gem_package.rb +35 -34
  207. data/test/rubygems/test_gem_package_old.rb +1 -1
  208. data/test/rubygems/test_gem_package_tar_header.rb +3 -3
  209. data/test/rubygems/test_gem_package_tar_reader.rb +19 -4
  210. data/test/rubygems/test_gem_package_tar_writer.rb +28 -28
  211. data/test/rubygems/test_gem_rdoc.rb +2 -2
  212. data/test/rubygems/test_gem_remote_fetcher.rb +13 -9
  213. data/test/rubygems/test_gem_request.rb +5 -5
  214. data/test/rubygems/test_gem_request_connection_pools.rb +2 -1
  215. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +14 -7
  216. data/test/rubygems/test_gem_security.rb +2 -2
  217. data/test/rubygems/test_gem_security_policy.rb +2 -2
  218. data/test/rubygems/test_gem_security_signer.rb +2 -2
  219. data/test/rubygems/test_gem_security_trust_dir.rb +6 -6
  220. data/test/rubygems/test_gem_spec_fetcher.rb +2 -2
  221. data/test/rubygems/test_gem_specification.rb +29 -29
  222. data/test/rubygems/test_gem_stream_ui.rb +1 -1
  223. data/test/rubygems/test_gem_update_suggestion.rb +12 -6
  224. data/test/rubygems/test_gem_util.rb +2 -2
  225. data/test/rubygems/test_gem_version.rb +4 -2
  226. data/test/rubygems/utilities.rb +4 -3
  227. metadata +9 -3
@@ -205,7 +205,8 @@ class TestGemPackage < Gem::Package::TarTestCase
205
205
 
206
206
  tar.rewind
207
207
 
208
- files, symlinks = [], []
208
+ files = []
209
+ symlinks = []
209
210
 
210
211
  Gem::Package::TarReader.new tar do |tar_io|
211
212
  tar_io.each_entry do |entry|
@@ -441,11 +442,11 @@ class TestGemPackage < Gem::Package::TarTestCase
441
442
  data_tgz = util_tar_gz {}
442
443
 
443
444
  gem = util_tar do |tar|
444
- tar.add_file "data.tar.gz", 0644 do |io|
445
+ tar.add_file "data.tar.gz", 0o644 do |io|
445
446
  io.write data_tgz.string
446
447
  end
447
448
 
448
- tar.add_file "metadata.gz", 0644 do |io|
449
+ tar.add_file "metadata.gz", 0o644 do |io|
449
450
  Zlib::GzipWriter.wrap io do |gzio|
450
451
  gzio.write @spec.to_yaml
451
452
  end
@@ -478,7 +479,7 @@ class TestGemPackage < Gem::Package::TarTestCase
478
479
  extracted = File.join @destination, "lib/code.rb"
479
480
  assert_path_exist extracted
480
481
 
481
- mask = 0100666 & (~File.umask)
482
+ mask = 0o100666 & (~File.umask)
482
483
 
483
484
  assert_equal mask.to_s(8), File.stat(extracted).mode.to_s(8) unless
484
485
  win_platform?
@@ -488,11 +489,11 @@ class TestGemPackage < Gem::Package::TarTestCase
488
489
  data_tgz = util_tar_gz {}
489
490
 
490
491
  gem = util_tar do |tar|
491
- tar.add_file "data.tar.gz", 0644 do |io|
492
+ tar.add_file "data.tar.gz", 0o644 do |io|
492
493
  io.write data_tgz.string
493
494
  end
494
495
 
495
- tar.add_file "metadata.gz", 0644 do |io|
496
+ tar.add_file "metadata.gz", 0o644 do |io|
496
497
  Zlib::GzipWriter.wrap io do |gzio|
497
498
  gzio.write @spec.to_yaml
498
499
  end
@@ -522,14 +523,14 @@ class TestGemPackage < Gem::Package::TarTestCase
522
523
  filepath = File.join @destination, "README.rdoc"
523
524
  assert_path_exist filepath
524
525
 
525
- assert_equal 0104444, File.stat(filepath).mode
526
+ assert_equal 0o104444, File.stat(filepath).mode
526
527
  end
527
528
 
528
529
  def test_extract_tar_gz_absolute
529
530
  package = Gem::Package.new @gem
530
531
 
531
532
  tgz_io = util_tar_gz do |tar|
532
- tar.add_file "/absolute.rb", 0644 do |io|
533
+ tar.add_file "/absolute.rb", 0o644 do |io|
533
534
  io.write "hi"
534
535
  end
535
536
  end
@@ -547,12 +548,12 @@ class TestGemPackage < Gem::Package::TarTestCase
547
548
  package.verify
548
549
 
549
550
  tgz_io = util_tar_gz do |tar|
550
- tar.add_file "relative.rb", 0644 do |io|
551
+ tar.add_file "relative.rb", 0o644 do |io|
551
552
  io.write "hi"
552
553
  end
553
554
 
554
- tar.mkdir "lib", 0755
555
- tar.add_symlink "lib/foo.rb", "../relative.rb", 0644
555
+ tar.mkdir "lib", 0o755
556
+ tar.add_symlink "lib/foo.rb", "../relative.rb", 0o644
556
557
  end
557
558
 
558
559
  begin
@@ -604,8 +605,8 @@ class TestGemPackage < Gem::Package::TarTestCase
604
605
  package.verify
605
606
 
606
607
  tgz_io = util_tar_gz do |tar|
607
- tar.mkdir "lib", 0755
608
- tar.add_symlink "lib/foo.rb", "../broken.rb", 0644
608
+ tar.mkdir "lib", 0o755
609
+ tar.add_symlink "lib/foo.rb", "../broken.rb", 0o644
609
610
  end
610
611
 
611
612
  ui = Gem::MockGemUi.new
@@ -624,9 +625,9 @@ class TestGemPackage < Gem::Package::TarTestCase
624
625
  package = Gem::Package.new @gem
625
626
 
626
627
  tgz_io = util_tar_gz do |tar|
627
- tar.mkdir "lib", 0755
628
- tar.add_symlink "lib/link", "../..", 0644
629
- tar.add_file "lib/link/outside.txt", 0644 do |io|
628
+ tar.mkdir "lib", 0o755
629
+ tar.add_symlink "lib/link", "../..", 0o644
630
+ tar.add_file "lib/link/outside.txt", 0o644 do |io|
630
631
  io.write "hi"
631
632
  end
632
633
  end
@@ -692,11 +693,11 @@ class TestGemPackage < Gem::Package::TarTestCase
692
693
  package = Gem::Package.new @gem
693
694
 
694
695
  tgz_io = util_tar_gz do |tar|
695
- tar.mkdir "lib", 0755
696
- tar.add_file "lib/foo.rb", 0644 do |io|
696
+ tar.mkdir "lib", 0o755
697
+ tar.add_file "lib/foo.rb", 0o644 do |io|
697
698
  io.write "hi"
698
699
  end
699
- tar.mkdir "lib/foo", 0755
700
+ tar.mkdir "lib/foo", 0o755
700
701
  end
701
702
 
702
703
  package.extract_tar_gz tgz_io, @destination
@@ -712,7 +713,7 @@ class TestGemPackage < Gem::Package::TarTestCase
712
713
  package = Gem::Package.new @gem
713
714
 
714
715
  tgz_io = util_tar_gz do |tar|
715
- tar.add_file "./dot_slash.rb", 0644 do |io|
716
+ tar.add_file "./dot_slash.rb", 0o644 do |io|
716
717
  io.write "hi"
717
718
  end
718
719
  end
@@ -727,7 +728,7 @@ class TestGemPackage < Gem::Package::TarTestCase
727
728
  package = Gem::Package.new @gem
728
729
 
729
730
  tgz_io = util_tar_gz do |tar|
730
- tar.add_file ".dot_file.rb", 0644 do |io|
731
+ tar.add_file ".dot_file.rb", 0o644 do |io|
731
732
  io.write "hi"
732
733
  end
733
734
  end
@@ -743,7 +744,7 @@ class TestGemPackage < Gem::Package::TarTestCase
743
744
  package = Gem::Package.new @gem
744
745
 
745
746
  tgz_io = util_tar_gz do |tar|
746
- tar.add_file "foo/file.rb", 0644 do |io|
747
+ tar.add_file "foo/file.rb", 0o644 do |io|
747
748
  io.write "hi"
748
749
  end
749
750
  end
@@ -857,7 +858,7 @@ class TestGemPackage < Gem::Package::TarTestCase
857
858
 
858
859
  def test_verify_checksum_bad
859
860
  data_tgz = util_tar_gz do |tar|
860
- tar.add_file "lib/code.rb", 0444 do |io|
861
+ tar.add_file "lib/code.rb", 0o444 do |io|
861
862
  io.write "# lib/code.rb"
862
863
  end
863
864
  end
@@ -867,11 +868,11 @@ class TestGemPackage < Gem::Package::TarTestCase
867
868
  gem = util_tar do |tar|
868
869
  metadata_gz = Gem::Util.gzip @spec.to_yaml
869
870
 
870
- tar.add_file "metadata.gz", 0444 do |io|
871
+ tar.add_file "metadata.gz", 0o444 do |io|
871
872
  io.write metadata_gz
872
873
  end
873
874
 
874
- tar.add_file "data.tar.gz", 0444 do |io|
875
+ tar.add_file "data.tar.gz", 0o444 do |io|
875
876
  io.write data_tgz
876
877
  end
877
878
 
@@ -881,7 +882,7 @@ class TestGemPackage < Gem::Package::TarTestCase
881
882
  "metadata.gz" => "bogus",
882
883
  },
883
884
  }
884
- tar.add_file "checksums.yaml.gz", 0444 do |io|
885
+ tar.add_file "checksums.yaml.gz", 0o444 do |io|
885
886
  Zlib::GzipWriter.wrap io do |gz_io|
886
887
  gz_io.write Psych.dump bogus_checksums
887
888
  end
@@ -904,7 +905,7 @@ class TestGemPackage < Gem::Package::TarTestCase
904
905
 
905
906
  def test_verify_checksum_missing
906
907
  data_tgz = util_tar_gz do |tar|
907
- tar.add_file "lib/code.rb", 0444 do |io|
908
+ tar.add_file "lib/code.rb", 0o444 do |io|
908
909
  io.write "# lib/code.rb"
909
910
  end
910
911
  end
@@ -914,7 +915,7 @@ class TestGemPackage < Gem::Package::TarTestCase
914
915
  gem = util_tar do |tar|
915
916
  metadata_gz = Gem::Util.gzip @spec.to_yaml
916
917
 
917
- tar.add_file "metadata.gz", 0444 do |io|
918
+ tar.add_file "metadata.gz", 0o444 do |io|
918
919
  io.write metadata_gz
919
920
  end
920
921
 
@@ -927,13 +928,13 @@ class TestGemPackage < Gem::Package::TarTestCase
927
928
  },
928
929
  }
929
930
 
930
- tar.add_file "checksums.yaml.gz", 0444 do |io|
931
+ tar.add_file "checksums.yaml.gz", 0o444 do |io|
931
932
  Zlib::GzipWriter.wrap io do |gz_io|
932
933
  gz_io.write Psych.dump checksums
933
934
  end
934
935
  end
935
936
 
936
- tar.add_file "data.tar.gz", 0444 do |io|
937
+ tar.add_file "data.tar.gz", 0o444 do |io|
937
938
  io.write data_tgz
938
939
  end
939
940
  end
@@ -952,7 +953,7 @@ class TestGemPackage < Gem::Package::TarTestCase
952
953
  tf = Tempfile.open "corrupt" do |io|
953
954
  data = Gem::Util.gzip "a" * 10
954
955
  io.write \
955
- tar_file_header("metadata.gz", "\000x", 0644, data.length, Time.now)
956
+ tar_file_header("metadata.gz", "\000x", 0o644, data.length, Time.now)
956
957
  io.write data
957
958
  io.rewind
958
959
 
@@ -1093,8 +1094,8 @@ class TestGemPackage < Gem::Package::TarTestCase
1093
1094
  build.add_metadata gem
1094
1095
  build.add_contents gem
1095
1096
 
1096
- gem.add_file_simple "a.sig", 0444, 0
1097
- gem.add_file_simple "a.sig", 0444, 0
1097
+ gem.add_file_simple "a.sig", 0o444, 0
1098
+ gem.add_file_simple "a.sig", 0o444, 0
1098
1099
  end
1099
1100
  end
1100
1101
 
@@ -1170,7 +1171,7 @@ class TestGemPackage < Gem::Package::TarTestCase
1170
1171
  def key; "key"; end
1171
1172
  def sign(*); "fake_sig"; end
1172
1173
  end
1173
- gem.add_file_signed "data2.tar.gz", 0444, fake_signer.new do |io|
1174
+ gem.add_file_signed "data2.tar.gz", 0o444, fake_signer.new do |io|
1174
1175
  io.write bogus_data
1175
1176
  end
1176
1177
 
@@ -39,7 +39,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
39
39
  extracted = File.join @destination, "lib/foo.rb"
40
40
  assert_path_exist extracted
41
41
 
42
- mask = 0100644 & (~File.umask)
42
+ mask = 0o100644 & (~File.umask)
43
43
 
44
44
  assert_equal mask, File.stat(extracted).mode unless win_platform?
45
45
  end
@@ -9,7 +9,7 @@ class TestGemPackageTarHeader < Gem::Package::TarTestCase
9
9
 
10
10
  header = {
11
11
  :name => "x",
12
- :mode => 0644,
12
+ :mode => 0o644,
13
13
  :uid => 1000,
14
14
  :gid => 10_000,
15
15
  :size => 100,
@@ -44,7 +44,7 @@ class TestGemPackageTarHeader < Gem::Package::TarTestCase
44
44
  assert_equal "group", @tar_header.gname, "gname"
45
45
  assert_equal "link", @tar_header.linkname, "linkname"
46
46
  assert_equal "ustar", @tar_header.magic, "magic"
47
- assert_equal 0644, @tar_header.mode, "mode"
47
+ assert_equal 0o644, @tar_header.mode, "mode"
48
48
  assert_equal 12_345, @tar_header.mtime, "mtime"
49
49
  assert_equal "x", @tar_header.name, "name"
50
50
  assert_equal "y", @tar_header.prefix, "prefix"
@@ -199,7 +199,7 @@ tjmather\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
199
199
  assert_equal 1_991_400_094, tar_header.gid
200
200
 
201
201
  assert_equal "GeoIP2-City_20190528/", tar_header.name
202
- assert_equal 0755, tar_header.mode
202
+ assert_equal 0o755, tar_header.mode
203
203
  assert_equal 0, tar_header.size
204
204
  assert_equal 1_559_064_640, tar_header.mtime
205
205
  assert_equal 6932, tar_header.checksum
@@ -25,11 +25,26 @@ class TestGemPackageTarReader < Gem::Package::TarTestCase
25
25
  io.close!
26
26
  end
27
27
 
28
+ def test_each_with_not_a_tar
29
+ text = "Hello, world!!?\n" * 256 # 4 KiB
30
+ io = TempIO.new text
31
+
32
+ Gem::Package::TarReader.new io do |tar|
33
+ assert_raise Gem::Package::TarInvalidError do
34
+ tar.each do
35
+ flunk "TarInvalidError was expected to occur, but an entry was found"
36
+ end
37
+ end
38
+ end
39
+ ensure
40
+ io.close!
41
+ end
42
+
28
43
  def test_rewind
29
44
  content = ("a".."z").to_a.join(" ")
30
45
 
31
46
  str =
32
- tar_file_header("lib/foo", "", 010644, content.size, Time.now) +
47
+ tar_file_header("lib/foo", "", 0o10644, content.size, Time.now) +
33
48
  content + "\0" * (512 - content.size)
34
49
  str << "\0" * 1024
35
50
 
@@ -90,7 +105,7 @@ class TestGemPackageTarReader < Gem::Package::TarTestCase
90
105
 
91
106
  def test_read_in_gem_data
92
107
  gem_tar = util_gem_data_tar do |tar|
93
- tar.add_file "lib/code.rb", 0444 do |io|
108
+ tar.add_file "lib/code.rb", 0o444 do |io|
94
109
  io.write "# lib/code.rb"
95
110
  end
96
111
  end
@@ -112,10 +127,10 @@ class TestGemPackageTarReader < Gem::Package::TarTestCase
112
127
 
113
128
  def test_seek_in_gem_data
114
129
  gem_tar = util_gem_data_tar do |tar|
115
- tar.add_file "lib/code.rb", 0444 do |io|
130
+ tar.add_file "lib/code.rb", 0o444 do |io|
116
131
  io.write "# lib/code.rb"
117
132
  end
118
- tar.add_file "lib/foo.rb", 0444 do |io|
133
+ tar.add_file "lib/foo.rb", 0o444 do |io|
119
134
  io.write "# lib/foo.rb"
120
135
  end
121
136
  end
@@ -29,11 +29,11 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
29
29
 
30
30
  def test_add_file
31
31
  Time.stub :now, Time.at(1_458_518_157) do
32
- @tar_writer.add_file "x", 0644 do |f|
32
+ @tar_writer.add_file "x", 0o644 do |f|
33
33
  f.write "a" * 10
34
34
  end
35
35
 
36
- assert_headers_equal(tar_file_header("x", "", 0644, 10, Time.now),
36
+ assert_headers_equal(tar_file_header("x", "", 0o644, 10, Time.now),
37
37
  @io.string[0, 512])
38
38
  end
39
39
  assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
@@ -43,18 +43,18 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
43
43
  def test_add_file_source_date_epoch
44
44
  ENV["SOURCE_DATE_EPOCH"] = "123456789"
45
45
  Time.stub :now, Time.at(1_458_518_157) do
46
- @tar_writer.mkdir "foo", 0644
46
+ @tar_writer.mkdir "foo", 0o644
47
47
 
48
- assert_headers_equal tar_dir_header("foo", "", 0644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
48
+ assert_headers_equal tar_dir_header("foo", "", 0o644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
49
49
  @io.string[0, 512]
50
50
  end
51
51
  end
52
52
 
53
53
  def test_add_symlink
54
54
  Time.stub :now, Time.at(1_458_518_157) do
55
- @tar_writer.add_symlink "x", "y", 0644
55
+ @tar_writer.add_symlink "x", "y", 0o644
56
56
 
57
- assert_headers_equal(tar_symlink_header("x", "", 0644, Time.now, "y"),
57
+ assert_headers_equal(tar_symlink_header("x", "", 0o644, Time.now, "y"),
58
58
  @io.string[0, 512])
59
59
  end
60
60
  assert_equal 512, @io.pos
@@ -63,9 +63,9 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
63
63
  def test_add_symlink_source_date_epoch
64
64
  ENV["SOURCE_DATE_EPOCH"] = "123456789"
65
65
  Time.stub :now, Time.at(1_458_518_157) do
66
- @tar_writer.add_symlink "x", "y", 0644
66
+ @tar_writer.add_symlink "x", "y", 0o644
67
67
 
68
- assert_headers_equal(tar_symlink_header("x", "", 0644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc, "y"),
68
+ assert_headers_equal(tar_symlink_header("x", "", 0o644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc, "y"),
69
69
  @io.string[0, 512])
70
70
  end
71
71
  end
@@ -74,7 +74,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
74
74
  digest_algorithms = Digest::SHA1.new, Digest::SHA512.new
75
75
 
76
76
  Time.stub :now, Time.at(1_458_518_157) do
77
- digests = @tar_writer.add_file_digest "x", 0644, digest_algorithms do |io|
77
+ digests = @tar_writer.add_file_digest "x", 0o644, digest_algorithms do |io|
78
78
  io.write "a" * 10
79
79
  end
80
80
 
@@ -86,7 +86,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
86
86
  "e1cf14b0",
87
87
  digests["SHA512"].hexdigest
88
88
 
89
- assert_headers_equal(tar_file_header("x", "", 0644, 10, Time.now),
89
+ assert_headers_equal(tar_file_header("x", "", 0o644, 10, Time.now),
90
90
  @io.string[0, 512])
91
91
  end
92
92
  assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
@@ -97,7 +97,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
97
97
  digest_algorithms = [Digest::SHA1.new, Digest::SHA512.new]
98
98
 
99
99
  Time.stub :now, Time.at(1_458_518_157) do
100
- digests = @tar_writer.add_file_digest "x", 0644, digest_algorithms do |io|
100
+ digests = @tar_writer.add_file_digest "x", 0o644, digest_algorithms do |io|
101
101
  io.write "a" * 10
102
102
  end
103
103
 
@@ -109,7 +109,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
109
109
  "e1cf14b0",
110
110
  digests["SHA512"].hexdigest
111
111
 
112
- assert_headers_equal(tar_file_header("x", "", 0644, 10, Time.now),
112
+ assert_headers_equal(tar_file_header("x", "", 0o644, 10, Time.now),
113
113
  @io.string[0, 512])
114
114
  end
115
115
  assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
@@ -122,11 +122,11 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
122
122
  signer = Gem::Security::Signer.new PRIVATE_KEY, [PUBLIC_CERT]
123
123
 
124
124
  Time.stub :now, Time.at(1_458_518_157) do
125
- @tar_writer.add_file_signed "x", 0644, signer do |io|
125
+ @tar_writer.add_file_signed "x", 0o644, signer do |io|
126
126
  io.write "a" * 10
127
127
  end
128
128
 
129
- assert_headers_equal(tar_file_header("x", "", 0644, 10, Time.now),
129
+ assert_headers_equal(tar_file_header("x", "", 0o644, 10, Time.now),
130
130
  @io.string[0, 512])
131
131
 
132
132
  assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
@@ -136,7 +136,7 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
136
136
 
137
137
  signature = signer.sign digest.digest
138
138
 
139
- assert_headers_equal(tar_file_header("x.sig", "", 0444, signature.length,
139
+ assert_headers_equal(tar_file_header("x.sig", "", 0o444, signature.length,
140
140
  Time.now),
141
141
  @io.string[1024, 512])
142
142
  assert_equal "#{signature}#{"\0" * (512 - signature.length)}",
@@ -150,11 +150,11 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
150
150
  signer = Gem::Security::Signer.new nil, nil
151
151
 
152
152
  Time.stub :now, Time.at(1_458_518_157) do
153
- @tar_writer.add_file_signed "x", 0644, signer do |io|
153
+ @tar_writer.add_file_signed "x", 0o644, signer do |io|
154
154
  io.write "a" * 10
155
155
  end
156
156
 
157
- assert_headers_equal(tar_file_header("x", "", 0644, 10, Time.now),
157
+ assert_headers_equal(tar_file_header("x", "", 0o644, 10, Time.now),
158
158
  @io.string[0, 512])
159
159
  end
160
160
  assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
@@ -164,11 +164,11 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
164
164
 
165
165
  def test_add_file_simple
166
166
  Time.stub :now, Time.at(1_458_518_157) do
167
- @tar_writer.add_file_simple "x", 0644, 10 do |io|
167
+ @tar_writer.add_file_simple "x", 0o644, 10 do |io|
168
168
  io.write "a" * 10
169
169
  end
170
170
 
171
- assert_headers_equal(tar_file_header("x", "", 0644, 10, Time.now),
171
+ assert_headers_equal(tar_file_header("x", "", 0o644, 10, Time.now),
172
172
  @io.string[0, 512])
173
173
 
174
174
  assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512]
@@ -179,11 +179,11 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
179
179
  def test_add_file_simple_source_date_epoch
180
180
  ENV["SOURCE_DATE_EPOCH"] = "123456789"
181
181
  Time.stub :now, Time.at(1_458_518_157) do
182
- @tar_writer.add_file_simple "x", 0644, 10 do |io|
182
+ @tar_writer.add_file_simple "x", 0o644, 10 do |io|
183
183
  io.write "a" * 10
184
184
  end
185
185
 
186
- assert_headers_equal(tar_file_header("x", "", 0644, 10, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
186
+ assert_headers_equal(tar_file_header("x", "", 0o644, 10, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
187
187
  @io.string[0, 512])
188
188
  end
189
189
  end
@@ -248,9 +248,9 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
248
248
 
249
249
  def test_mkdir
250
250
  Time.stub :now, Time.at(1_458_518_157) do
251
- @tar_writer.mkdir "foo", 0644
251
+ @tar_writer.mkdir "foo", 0o644
252
252
 
253
- assert_headers_equal tar_dir_header("foo", "", 0644, Time.now),
253
+ assert_headers_equal tar_dir_header("foo", "", 0o644, Time.now),
254
254
  @io.string[0, 512]
255
255
 
256
256
  assert_equal 512, @io.pos
@@ -260,19 +260,19 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
260
260
  def test_mkdir_source_date_epoch
261
261
  ENV["SOURCE_DATE_EPOCH"] = "123456789"
262
262
  Time.stub :now, Time.at(1_458_518_157) do
263
- @tar_writer.mkdir "foo", 0644
263
+ @tar_writer.mkdir "foo", 0o644
264
264
 
265
- assert_headers_equal tar_dir_header("foo", "", 0644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
265
+ assert_headers_equal tar_dir_header("foo", "", 0o644, Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc),
266
266
  @io.string[0, 512]
267
267
  end
268
268
  end
269
269
 
270
270
  def test_split_name
271
271
  assert_equal ["b" * 100, "a" * 155],
272
- @tar_writer.split_name("#{'a' * 155}/#{'b' * 100}")
272
+ @tar_writer.split_name("#{"a" * 155}/#{"b" * 100}")
273
273
 
274
- assert_equal ["#{'qwer/' * 19}bla", "a" * 151],
275
- @tar_writer.split_name("#{'a' * 151}/#{'qwer/' * 19}bla")
274
+ assert_equal ["#{"qwer/" * 19}bla", "a" * 151],
275
+ @tar_writer.split_name("#{"a" * 151}/#{"qwer/" * 19}bla")
276
276
  names = [
277
277
  ([""] + ["123456789"] * 9 + ["1234567890"]).join("/"), # 101 bytes (several pieces)
278
278
  (["123456789"] * 9 + ["1234567890"] + [""]).join("/"), # 101 bytes (several pieces)
@@ -100,7 +100,7 @@ class TestGemRDoc < Gem::TestCase
100
100
 
101
101
  assert_equal @a.base_dir, e.directory
102
102
  ensure
103
- FileUtils.chmod(0755, @a.base_dir) if File.directory?(@a.base_dir)
103
+ FileUtils.chmod(0o755, @a.base_dir) if File.directory?(@a.base_dir)
104
104
  end
105
105
 
106
106
  def test_ri_installed?
@@ -130,7 +130,7 @@ class TestGemRDoc < Gem::TestCase
130
130
  assert_equal @a.doc_dir, e.directory
131
131
  ensure
132
132
  if File.exist? @a.doc_dir
133
- FileUtils.chmod 0755, @a.doc_dir
133
+ FileUtils.chmod 0o755, @a.doc_dir
134
134
  FileUtils.rm_r @a.doc_dir
135
135
  end
136
136
  end
@@ -361,9 +361,13 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
361
361
  FileUtils.mv @a1_gem, @tempdir
362
362
  local_path = File.join @tempdir, @a1.file_name
363
363
  inst = nil
364
- FileUtils.chmod 0555, @a1.cache_dir
365
- FileUtils.mkdir_p File.join(Gem.user_dir, "cache") rescue nil
366
- FileUtils.chmod 0555, File.join(Gem.user_dir, "cache")
364
+ FileUtils.chmod 0o555, @a1.cache_dir
365
+ begin
366
+ FileUtils.mkdir_p File.join(Gem.user_dir, "cache")
367
+ rescue StandardError
368
+ nil
369
+ end
370
+ FileUtils.chmod 0o555, File.join(Gem.user_dir, "cache")
367
371
 
368
372
  Dir.chdir @tempdir do
369
373
  inst = Gem::RemoteFetcher.fetcher
@@ -372,21 +376,21 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
372
376
  assert_equal(File.join(@tempdir, @a1.file_name),
373
377
  inst.download(@a1, local_path))
374
378
  ensure
375
- FileUtils.chmod 0755, File.join(Gem.user_dir, "cache")
376
- FileUtils.chmod 0755, @a1.cache_dir
379
+ FileUtils.chmod 0o755, File.join(Gem.user_dir, "cache")
380
+ FileUtils.chmod 0o755, @a1.cache_dir
377
381
  end
378
382
 
379
383
  def test_download_read_only
380
- FileUtils.chmod 0555, @a1.cache_dir
381
- FileUtils.chmod 0555, @gemhome
384
+ FileUtils.chmod 0o555, @a1.cache_dir
385
+ FileUtils.chmod 0o555, @gemhome
382
386
 
383
387
  fetcher = util_fuck_with_fetcher File.read(@a1_gem)
384
388
  fetcher.download(@a1, "http://gems.example.com")
385
389
  a1_cache_gem = File.join Gem.user_dir, "cache", @a1.file_name
386
390
  assert File.exist? a1_cache_gem
387
391
  ensure
388
- FileUtils.chmod 0755, @gemhome
389
- FileUtils.chmod 0755, @a1.cache_dir
392
+ FileUtils.chmod 0o755, @gemhome
393
+ FileUtils.chmod 0o755, @a1.cache_dir
390
394
  end
391
395
  end
392
396
 
@@ -112,8 +112,8 @@ class TestGemRequest < Gem::TestCase
112
112
  end
113
113
 
114
114
  def test_configure_connection_for_https_ssl_ca_cert
115
- ssl_ca_cert, Gem.configuration.ssl_ca_cert =
116
- Gem.configuration.ssl_ca_cert, CA_CERT_FILE
115
+ ssl_ca_cert = Gem.configuration.ssl_ca_cert
116
+ Gem.configuration.ssl_ca_cert = CA_CERT_FILE
117
117
 
118
118
  connection = Net::HTTP.new "localhost", 443
119
119
 
@@ -214,7 +214,7 @@ class TestGemRequest < Gem::TestCase
214
214
  end
215
215
 
216
216
  auth_header = conn.payload["Authorization"]
217
- assert_equal "Basic #{base64_encode64('user:pass')}".strip, auth_header
217
+ assert_equal "Basic #{base64_encode64("user:pass")}".strip, auth_header
218
218
  assert_includes @ui.output, "GET https://user:REDACTED@example.rubygems/specs.#{Gem.marshal_version}"
219
219
  end
220
220
 
@@ -231,7 +231,7 @@ class TestGemRequest < Gem::TestCase
231
231
  end
232
232
 
233
233
  auth_header = conn.payload["Authorization"]
234
- assert_equal "Basic #{base64_encode64('user:{DEScede}pass')}".strip, auth_header
234
+ assert_equal "Basic #{base64_encode64("user:{DEScede}pass")}".strip, auth_header
235
235
  assert_includes @ui.output, "GET https://user:REDACTED@example.rubygems/specs.#{Gem.marshal_version}"
236
236
  end
237
237
 
@@ -248,7 +248,7 @@ class TestGemRequest < Gem::TestCase
248
248
  end
249
249
 
250
250
  auth_header = conn.payload["Authorization"]
251
- assert_equal "Basic #{base64_encode64('{DEScede}pass:x-oauth-basic')}".strip, auth_header
251
+ assert_equal "Basic #{base64_encode64("{DEScede}pass:x-oauth-basic")}".strip, auth_header
252
252
  assert_includes @ui.output, "GET https://REDACTED:x-oauth-basic@example.rubygems/specs.#{Gem.marshal_version}"
253
253
  end
254
254
 
@@ -121,7 +121,8 @@ class TestGemRequestConnectionPool < Gem::TestCase
121
121
  end
122
122
 
123
123
  def test_net_http_args_no_proxy
124
- orig_no_proxy, ENV["no_proxy"] = ENV["no_proxy"], "example"
124
+ orig_no_proxy = ENV["no_proxy"]
125
+ ENV["no_proxy"] = "example"
125
126
 
126
127
  pools = Gem::Request::ConnectionPools.new nil, []
127
128