ruby-changes:54467
From: naruse <ko1@a...>
Date: Wed, 2 Jan 2019 07:50:01 +0900 (JST)
Subject: [ruby-changes:54467] naruse:r66682 (trunk): suppress warning: method redefined; discarding old + introduced at r66681
naruse 2019-01-02 07:49:55 +0900 (Wed, 02 Jan 2019) New Revision: 66682 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66682 Log: suppress warning: method redefined; discarding old + introduced at r66681 Modified files: trunk/test/ruby/test_complex.rb Index: test/ruby/test_complex.rb =================================================================== --- test/ruby/test_complex.rb (revision 66681) +++ test/ruby/test_complex.rb (revision 66682) @@ -272,6 +272,7 @@ class Complex_Test < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_complex.rb#L272 def test_add_with_redefining_int_plus assert_in_out_err([], <<-'end;', ['true'], []) class Integer + remove_method :+ def +(other); 42; end end a = Complex(1, 2) + Complex(0, 1) @@ -282,6 +283,7 @@ class Complex_Test < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_complex.rb#L283 def test_add_with_redefining_float_plus assert_in_out_err([], <<-'end;', ['true'], []) class Float + remove_method :+ def +(other); 42.0; end end a = Complex(1, 2.0) + Complex(0, 1) @@ -292,6 +294,7 @@ class Complex_Test < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_complex.rb#L294 def test_add_with_redefining_rational_plus assert_in_out_err([], <<-'end;', ['true'], []) class Rational + remove_method :+ def +(other); 355/113r; end end a = Complex(1, 2r) + Complex(0, 1) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/