summaryrefslogtreecommitdiff
path: root/bootstraptest/test_method.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-18 05:07:07 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-18 05:07:07 +0000
commit0c031468fe31537bad55ce558e22a6c5da527d7d (patch)
tree2a84bdbf5bf118bc4f08bbe3e962425dc3a7705c /bootstraptest/test_method.rb
parent3f025d2078157e895fdcf77e31bfe62351bf90b4 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r--bootstraptest/test_method.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 28fee41..9a59b63 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
+}