[前][次][番号順一覧][スレッド一覧]

ruby-changes:54176

From: nobu <ko1@a...>
Date: Fri, 14 Dec 2018 13:10:46 +0900 (JST)
Subject: [ruby-changes:54176] nobu:r66397 (trunk): Suppress deprecation warnings

nobu	2018-12-14 13:10:42 +0900 (Fri, 14 Dec 2018)

  New Revision: 66397

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66397

  Log:
    Suppress deprecation warnings

  Modified files:
    trunk/ext/bigdecimal/depend
    trunk/test/bigdecimal/test_bigdecimal.rb
Index: ext/bigdecimal/depend
===================================================================
--- ext/bigdecimal/depend	(revision 66396)
+++ ext/bigdecimal/depend	(revision 66397)
@@ -1,4 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/depend#L1
 extconf.h: $(srcdir)/$(GEMSPEC)
+Makefile: $(srcdir)/lib/bigdecimal.rb
 
 # AUTOGENERATED DEPENDENCIES START
 bigdecimal.o: $(RUBY_EXTCONF_H)
Index: test/bigdecimal/test_bigdecimal.rb
===================================================================
--- test/bigdecimal/test_bigdecimal.rb	(revision 66396)
+++ test/bigdecimal/test_bigdecimal.rb	(revision 66397)
@@ -219,11 +219,14 @@ class TestBigDecimal < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/bigdecimal/test_bigdecimal.rb#L219
   def test_s_new
     # TODO: BigDecimal.new will be removed on 1.5
     # assert_raise_with_message(NoMethodError, /undefined method `new'/) { BigDecimal.new("1") }
+    verbose, $VERBOSE = $VERBOSE, nil
     assert_equal(BigDecimal(1), BigDecimal.new(1))
     assert_raise(ArgumentError) { BigDecimal.new(',', exception: true) }
     assert_nothing_raised { assert_equal(nil, BigDecimal.new(',', exception: false)) }
     assert_raise(TypeError) { BigDecimal.new(nil, exception: true) }
     assert_nothing_raised { assert_equal(nil, BigDecimal.new(nil, exception: false)) }
+  ensure
+    $VERBOSE = verbose
   end
 
   def _test_mode(type)
@@ -1829,11 +1832,14 @@ class TestBigDecimal < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/bigdecimal/test_bigdecimal.rb#L1832
     c = Class.new(BigDecimal)
     # TODO: BigDecimal.new will be removed on 1.5
     # assert_raise_with_message(NoMethodError, /undefined method `new'/) { c.new(1) }
+    verbose, $VERBOSE = $VERBOSE, nil
     assert_equal(BigDecimal(1), c.new(1))
     assert_raise(ArgumentError) { c.new(',', exception: true) }
     assert_nothing_raised { assert_equal(nil, c.new(',', exception: false)) }
     assert_raise(TypeError) { c.new(nil, exception: true) }
     assert_nothing_raised { assert_equal(nil, c.new(nil, exception: false)) }
+  ensure
+    $VERBOSE = verbose
   end
 
   def test_to_d

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]