summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-09-14 23:20:57 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-09-14 23:21:44 +0900
commit76355dee686254dcf51fcd42fbe13c8f00c3aa95 (patch)
tree57c649d1f168fb7882d20635ba65b9c0e95145da /doc
parent28bbd3e7d9195727b0a45ae5d55b9d5a1345b918 (diff)
downloadmruby-76355dee686254dcf51fcd42fbe13c8f00c3aa95.tar.gz
mruby-76355dee686254dcf51fcd42fbe13c8f00c3aa95.zip
Add unavailability of declaration form of visibility methods; #4708
Diffstat (limited to 'doc')
-rw-r--r--doc/limitations.md38
1 files changed, 37 insertions, 1 deletions
diff --git a/doc/limitations.md b/doc/limitations.md
index e6f40a942..6958d396f 100644
--- a/doc/limitations.md
+++ b/doc/limitations.md
@@ -96,7 +96,7 @@ p Liste.new "foobar"
## Method visibility
For simplicity reasons no method visibility (public/private/protected) is
-supported.
+supported. Those methods are defined but they are dummy methods.
```ruby
class VisibleTest
@@ -126,6 +126,42 @@ true
true
```
+### Visibility Declaration
+
+The declaration form of following visibility methods are not implemented.
+
+* `public`
+* `private`
+* `protected`
+* `module_function`
+
+Especially, `module_function` method is not dummy, but no declaration form.
+
+```
+module TestModule
+ module_function
+ def test_func
+ p 'test_func called'
+ end
+
+ test_func
+end
+
+p 'ok'
+```
+
+#### Ruby [ruby 2.5.5p157 (2019-03-15 revision 67260)]
+
+```
+ok
+```
+
+#### mruby [2.0.1 (2019-4-4)]
+
+```
+test.rb:8: undefined method 'test_func' (NoMethodError)
+```
+
## `defined?`
The `defined?` keyword is considered too complex to be fully