diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-30 21:27:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-30 21:27:27 +0000 |
commit | c5fe7eb6f688c90208ff95da5bf4e86e54f62edf (patch) | |
tree | 4f033540473fd40695c09facafe1ae444fa69caa /test | |
parent | b5583577d46e8aa1725840186e0f609cacec1bda (diff) |
class.c: suppress wrong warning
* class.c (HAVE_METACLASS_P): should check FL_SINGLTON flag before get
instance variable to get rid of wrong warning about __attached__.
[ruby-core:53839] [Bug #8188]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_eval.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb index 580d3e88b1..a97b982246 100644 --- a/test/ruby/test_eval.rb +++ b/test/ruby/test_eval.rb @@ -215,6 +215,13 @@ class TestEval < Test::Unit::TestCase end end + def test_instance_eval_on_argf_singleton_class + bug8188 = '[ruby-core:53839] [Bug #8188]' + assert_warning('', bug8188) do + ARGF.singleton_class.instance_eval{} + end + end + class Foo Bar = 2 end |