diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-21 06:40:27 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-21 06:40:27 +0000 |
commit | 32a5a098e39e377350e4696d2d9f2d8930f1ec41 (patch) | |
tree | 5729c5e3cf0171cb7e2c876f7734bbe85b3abd17 /vm_method.c | |
parent | ac9d6b050b6a475a3a6a683390a08a693e5835fa (diff) |
* vm_method.c: Remove private attribute warning [Bug #10967]
Patch by @spastorino [Fixes GH-849]
https://github.com/ruby/ruby/pull/849
* test/ruby/test_module.rb: Update test for changes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c index c7caccb32f..853e66799e 100644 --- a/vm_method.c +++ b/vm_method.c @@ -917,9 +917,9 @@ rb_attr(VALUE klass, ID id, int read, int write, int ex) else { if (SCOPE_TEST(NOEX_PRIVATE)) { noex = NOEX_PRIVATE; - rb_warning((SCOPE_CHECK(NOEX_MODFUNC)) ? - "attribute accessor as module_function" : - "private attribute?"); + if (SCOPE_CHECK(NOEX_MODFUNC)) { + rb_warning("attribute accessor as module_function"); + } } else if (SCOPE_TEST(NOEX_PROTECTED)) { noex = NOEX_PROTECTED; |