aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 75a7b52ca8..fa7a408ede 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1232,6 +1232,15 @@ class TestModule < Test::Unit::TestCase
assert_equal("bar", c.class_eval("BAR"))
end
+ def test_private_constant_with_no_args
+ assert_in_out_err([], <<-RUBY, [], ["-:3: warning: private_constant with no argument is just ignored"])
+ $-w = true
+ class X
+ private_constant
+ end
+ RUBY
+ end
+
class PrivateClass
end
private_constant :PrivateClass