mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_assignment.rb: use bug number for assert message
to suppress variable unused warning
This commit is contained in:
parent
b414999370
commit
5cb283217b
1 changed files with 8 additions and 8 deletions
|
@ -119,31 +119,31 @@ class TestAssignment < Test::Unit::TestCase
|
|||
def []=(i, a); 42; end
|
||||
end
|
||||
|
||||
assert_raise(NoMethodError) {
|
||||
assert_raise(NoMethodError, bug11096) {
|
||||
o.instance_eval {o.foo = 1}
|
||||
}
|
||||
assert_nothing_raised(NoMethodError) {
|
||||
assert_nothing_raised(NoMethodError, bug11096) {
|
||||
assert_equal(1, o.instance_eval {self.foo = 1})
|
||||
}
|
||||
|
||||
assert_raise(NoMethodError) {
|
||||
assert_raise(NoMethodError, bug11096) {
|
||||
o.instance_eval {o[0] = 1}
|
||||
}
|
||||
assert_nothing_raised(NoMethodError) {
|
||||
assert_nothing_raised(NoMethodError, bug11096) {
|
||||
assert_equal(1, o.instance_eval {self[0] = 1})
|
||||
}
|
||||
|
||||
assert_nothing_raised(NoMethodError) {
|
||||
assert_nothing_raised(NoMethodError, bug11096) {
|
||||
o.instance_eval {self.foo += 1}
|
||||
}
|
||||
assert_nothing_raised(NoMethodError) {
|
||||
assert_nothing_raised(NoMethodError, bug11096) {
|
||||
o.instance_eval {self.foo &&= 1}
|
||||
}
|
||||
|
||||
assert_nothing_raised(NoMethodError) {
|
||||
assert_nothing_raised(NoMethodError, bug11096) {
|
||||
o.instance_eval {self[0] += 1}
|
||||
}
|
||||
assert_nothing_raised(NoMethodError) {
|
||||
assert_nothing_raised(NoMethodError, bug11096) {
|
||||
o.instance_eval {self[0] &&= 1}
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue