mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_method.rb, test_proc.rb: suppress warnings
* test/ruby/test_method.rb: suppress warnings in verbose mode. * test/ruby/test_proc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
485e6ebed8
commit
c8185b327e
2 changed files with 5 additions and 4 deletions
|
@ -22,7 +22,7 @@ class TestMethod < Test::Unit::TestCase
|
||||||
def mo5(a, *b, c) end
|
def mo5(a, *b, c) end
|
||||||
def mo6(a, *b, c, &d) end
|
def mo6(a, *b, c, &d) end
|
||||||
def mo7(a, b = nil, *c, d, &e) end
|
def mo7(a, b = nil, *c, d, &e) end
|
||||||
def ma1((a), &b) end
|
def ma1((a), &b) nil && a end
|
||||||
|
|
||||||
class Base
|
class Base
|
||||||
def foo() :base end
|
def foo() :base end
|
||||||
|
@ -293,7 +293,7 @@ class TestMethod < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_nothing_raised do
|
assert_nothing_raised(bug8686) do
|
||||||
m.define_singleton_method(:a, m.method(:a))
|
m.define_singleton_method(:a, m.method(:a))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -456,7 +456,7 @@ class TestMethod < Test::Unit::TestCase
|
||||||
define_method(:pmo5) {|a, *b, c|}
|
define_method(:pmo5) {|a, *b, c|}
|
||||||
define_method(:pmo6) {|a, *b, c, &d|}
|
define_method(:pmo6) {|a, *b, c, &d|}
|
||||||
define_method(:pmo7) {|a, b = nil, *c, d, &e|}
|
define_method(:pmo7) {|a, b = nil, *c, d, &e|}
|
||||||
define_method(:pma1) {|(a), &b|}
|
define_method(:pma1) {|(a), &b| nil && a}
|
||||||
|
|
||||||
def test_bound_parameters
|
def test_bound_parameters
|
||||||
assert_equal([], method(:m0).parameters)
|
assert_equal([], method(:m0).parameters)
|
||||||
|
@ -659,6 +659,7 @@ class TestMethod < Test::Unit::TestCase
|
||||||
prepend m
|
prepend m
|
||||||
}
|
}
|
||||||
assert_raise(NameError, bug7988) {Module.new{prepend m}.instance_method(:bar)}
|
assert_raise(NameError, bug7988) {Module.new{prepend m}.instance_method(:bar)}
|
||||||
|
true || c || bug7836
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_gced_bmethod
|
def test_gced_bmethod
|
||||||
|
|
|
@ -1209,7 +1209,7 @@ class TestProc < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_binding if: 1, case: 2, when: 3, begin: 4, end: 5
|
def get_binding if: 1, case: 2, when: 3, begin: 4, end: 5
|
||||||
a = 0
|
a ||= 0
|
||||||
binding
|
binding
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue