From c6c33ec6ff69ac85c0047c71075e0964244b95b8 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 14 Apr 2013 15:17:44 +0000 Subject: merge revision(s) 40013,40032: [Backport #8188] * 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] * class.c (HAVE_METACLASS_P): should check FL_SINGLETON flag before get git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_eval.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3