summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbronzdoc <[email protected]>2020-04-19 08:18:29 -0600
committerHiroshi SHIBATA <[email protected]>2020-05-08 07:38:50 +0900
commit0e85a39dc70328641c3155f66568feedbe6dd15f ()
treececa5a76908cfc7c25b0b10e70aa2273f5070556
parent7db538a7c92bcbcccb97d2ffcf505bee4d85e7d3 (diff)
[rubygems/rubygems] Restore and deprecate old deprecate method
https://.com/rubygems/rubygems/commit/024267fa60
Notes: Merged: https://.com/ruby/ruby/pull/3087
-rw-r--r--lib/rubygems/deprecate.rb25
-rw-r--r--test/rubygems/test_deprecate.rb26
2 files changed, 51 insertions, 0 deletions
@@ -49,6 +49,31 @@ module Gem::Deprecate
# Simple deprecation method that deprecates +name+ by wrapping it up
# in a dummy method. It warns on each call to the dummy method
# telling the user of +repl+ (unless +repl+ is :none) and the
# Rubygems version that it is planned to go away.
def rubygems_deprecate(name, replacement=:none)
@@ -54,6 +54,20 @@ class TestDeprecate < Gem::TestCase
end
def test_deprecated_method_calls_the_old_method
capture_io do
thing = Thing.new
@@ -91,4 +105,16 @@ class TestDeprecate < Gem::TestCase
Gem::Commands.send(:remove_const, :FooCommand)
end
end