summaryrefslogtreecommitdiff
path: root/test/ruby/test_method.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-20 22:03:37 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-20 22:05:54 +0900
commite81a3e6df54842b5a836dad7055a4295cf4155bc (patch)
tree4da7dc9f6a16085c5623c3a09e5cbf768d0963c7 /test/ruby/test_method.rb
parent9e171b1fa0b4e2e5b0bf82da11b4b511c602c336 (diff)
Allows calling a private method only with bare `self`
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r--test/ruby/test_method.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index a8064c47c2..a141202014 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -674,6 +674,7 @@ class TestMethod < Test::Unit::TestCase
assert_nothing_raised { self.mv1 }
assert_nothing_raised { self.mv2 }
+ assert_raise(NoMethodError) { (self).mv2 }
assert_nothing_raised { self.mv3 }
v = Visibility.new