summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2016-02-11 21:19:48 +0800
committerDaniel Bovensiepen <[email protected]>2016-02-11 21:19:48 +0800
commit44d26dd994d65107c0c9b1aa3009e839ae779970 (patch)
tree960f1aa177a9f42b4b730b81cd392e24740bbc7d /doc
parent18870428bc4489d25ec89c973fe1d8e67250c29c (diff)
downloadmruby-44d26dd994d65107c0c9b1aa3009e839ae779970.tar.gz
mruby-44d26dd994d65107c0c9b1aa3009e839ae779970.zip
Add more limitations
Diffstat (limited to 'doc')
-rw-r--r--doc/limitations.md77
1 files changed, 77 insertions, 0 deletions
diff --git a/doc/limitations.md b/doc/limitations.md
index dd153f9ce..16f9a640b 100644
--- a/doc/limitations.md
+++ b/doc/limitations.md
@@ -64,3 +64,80 @@ end
#### mruby [1.2.0 (2015-11-17)]
No exception is raised.
+
+## Check of infinite recursion
+
+mruby does not check infinite recursion across C extensions.
+
+```ruby
+def test; eval 'test'; end; test
+```
+
+#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]
+
+```SystemStackError``` is raised.
+
+#### mruby [1.2.0 (2015-11-17)]
+
+Segmentation fault.
+
+## Fiber execution can't cross C function boundary
+
+mruby's ```Fiber``` is implemented in a similar way to Lua's co-routine. This
+results in the consequence that you can't switch context within C functions.
+Only exception is ```mrb_fiber_yield``` at return.
+
+## ```Array``` does not support instance variables
+
+To reduce memory consumption ```Array``` does not support instance variables.
+
+```ruby
+class Liste < Array
+ def initialize(str = nil)
+ @feld = str
+ end
+end
+
+p Liste.new "foobar"
+```
+
+#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]
+
+```[]```
+
+#### mruby [1.2.0 (2015-11-17)]
+
+```ArgumentError``` is raised.
+
+## Method visibility
+
+For simplicity reasons no method visibility (public/private/protected) is
+supported.
+
+```ruby
+class VisibleTest
+
+ def public_method; end
+
+ private
+ def private_method; end
+
+end
+
+p VisibleTest.new.respond_to?(:private_method, false)
+p VisibleTest.new.respond_to?(:private_method, true)
+```
+
+#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]
+
+```
+false
+true
+```
+
+#### mruby [1.2.0 (2015-11-17)]
+
+```
+true
+true
+```