mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress some warnings
``` .../ruby/test/ruby/test_keyword.rb:3509: warning: assigned but unused variable - bug8993 .../ruby/test/ruby/test_object.rb:83: warning: assigned but unused variable - f .../ruby/test/ruby/test_object.rb:95: warning: method redefined; discarding old initialize_clone .../ruby/test/ruby/test_object.rb:84: warning: previous definition of initialize_clone was here ```
This commit is contained in:
parent
7392083c2f
commit
e92bebb0c5
2 changed files with 3 additions and 2 deletions
|
@ -3506,7 +3506,6 @@ class TestKeywordArguments < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_precedence_of_keyword_arguments_with_post_argument
|
||||
bug8993 = '[ruby-core:57706] [Bug #8993]'
|
||||
a = Class.new do
|
||||
def foo(a, b, c=1, *d, e, f:2, **g)
|
||||
[a, b, c, d, e, f, g]
|
||||
|
|
|
@ -80,7 +80,6 @@ class TestObject < Test::Unit::TestCase
|
|||
attr_reader :f
|
||||
end
|
||||
o = c.new
|
||||
f = true
|
||||
def o.initialize_clone(_, freeze: true)
|
||||
@f = freeze
|
||||
super
|
||||
|
@ -92,6 +91,9 @@ class TestObject < Test::Unit::TestCase
|
|||
assert_kind_of c, clone
|
||||
assert_equal false, clone.f
|
||||
|
||||
class << o
|
||||
remove_method(:initialize_clone)
|
||||
end
|
||||
def o.initialize_clone(_)
|
||||
super
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue