diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-11-25 11:00:28 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-11-25 11:01:27 +0900 |
commit | b5aa161383ec214b1d6296ea5c76dfe28737821f (patch) | |
tree | 4901d6ae97f58f3243b47cee11e0b1565587f554 /test | |
parent | 8bde66167fb310b8b4297821e15a9adfa3cb9dd4 (diff) |
test/ruby/test_iseq.rb: Avoid pollution of method namespace
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20211125T003004Z.log.html.gz
```
[ 4780/21204] TestISeq#test_super_with_anonymous_block/home/chkbuild/chkbuild/tmp/build/20211125T003004Z/ruby/test/ruby/test_iseq.rb:141: warning: method redefined; discarding old touch3
/home/chkbuild/chkbuild/tmp/build/20211125T003004Z/ruby/test/ruby/test_iseq.rb:121: warning: previous definition of touch3 was here
= 0.00 s
```
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_iseq.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index d106caa840..847ce6995c 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -97,7 +97,7 @@ class TestISeq < Test::Unit::TestCase def test_super_with_block iseq = compile(<<~EOF, __LINE__+1) - def touch(*) # :nodoc: + def (Object.new).touch(*) # :nodoc: foo { super } end 42 @@ -108,7 +108,7 @@ class TestISeq < Test::Unit::TestCase def test_super_with_block_hash_0 iseq = compile(<<~EOF, __LINE__+1) # [Bug #18250] `req` specifically cause `Assertion failed: (key != 0), function hash_table_raw_insert` - def touch2(req, *) + def (Object.new).touch(req, *) foo { super } end 42 @@ -118,7 +118,7 @@ class TestISeq < Test::Unit::TestCase def test_super_with_block_and_kwrest iseq = compile(<<~EOF, __LINE__+1) - def touch3(**) # :nodoc: + def (Object.new).touch(**) # :nodoc: foo { super } end 42 @@ -138,7 +138,7 @@ class TestISeq < Test::Unit::TestCase def test_super_with_anonymous_block iseq = compile(<<~EOF, __LINE__+1) - def touch3(&) # :nodoc: + def (Object.new).touch(&) # :nodoc: foo { super } end 42 |