From 8a100acfeb09cf513c05d8b23836aecb3f5f3954 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 18 Aug 2007 05:07:07 +0000 Subject: * compile.c (iseq_compile_each): fix to allow self.x= if x= is private. * bootstraptest/test_method.rb: add a test for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_method.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bootstraptest/test_method.rb') diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index 28fee41d1..9a59b63d5 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -906,3 +906,13 @@ assert_equal %q{[:ok, :ok, :ok, :ok, :ok, :ok, :ng, :ng]}, %q{ $ans } +assert_equal 'ok', %q{ + class C + def x=(n) + end + def m + self.x = :ok + end + end + C.new.m +} -- cgit