mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02:00
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
This commit is contained in:
parent
b5583577d4
commit
c5fe7eb6f6
3 changed files with 22 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue