From 3bbc486cf96684536184fe3da1677a286f5b7e91 Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Thu, 11 Feb 2016 04:38:29 +0800 Subject: Add limitation file --- doc/limitations.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 doc/limitations.md (limited to 'doc/limitations.md') diff --git a/doc/limitations.md b/doc/limitations.md new file mode 100644 index 000000000..006083eff --- /dev/null +++ b/doc/limitations.md @@ -0,0 +1,59 @@ +# Limitations + +The philosophy of mruby is to be a lightweight implementation of +the Ruby ISO standard. These two objectives are partially contradicting +due to the reason that Ruby is a powerful language with complex +implementation details which are difficult to implement in a lightweight +manner. + +This document is collecting these limitations. + +## Integrity + +This document does not contain a complete list of limitations. +Please help to improve it by submitting your findings. + +## Confirmed limitations + +### ```Array``` passed to ```puts``` + +Passing an Array to ```puts``` results in different output. + +```ruby +puts [1,2,3] +``` + +#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)] + +``` +1 +2 +3 +``` + +#### mruby [1.2.0 (2015-11-17)] + +``` +[1, 2, 3] +``` + +### ```Kernel.raise``` in rescue clause + +```Kernel.raise``` without arguments does not raise the current exception within +a rescue clause. + +```ruby +begin + 1 / 0 +rescue + raise +end +``` + +#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)] + +```ZeroDivisionError``` is raised. + +#### mruby [1.2.0 (2015-11-17)] + +No exception is raised. -- cgit v1.2.3 From 983948c5be0bc170c7944b4353540cdb0e6afea9 Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Thu, 11 Feb 2016 04:48:57 +0800 Subject: Small format fix --- doc/limitations.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'doc/limitations.md') diff --git a/doc/limitations.md b/doc/limitations.md index 006083eff..64054fcc6 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -1,10 +1,10 @@ # Limitations The philosophy of mruby is to be a lightweight implementation of -the Ruby ISO standard. These two objectives are partially contradicting -due to the reason that Ruby is a powerful language with complex -implementation details which are difficult to implement in a lightweight -manner. +the Ruby ISO standard. These two objectives are partially contradicting. +Ruby is an expressive language with complex implementation details which +are difficult to implement in a lightweight manner. To cope with this, +limitations to the "Ruby Compatibility" are defined. This document is collecting these limitations. @@ -13,9 +13,7 @@ This document is collecting these limitations. This document does not contain a complete list of limitations. Please help to improve it by submitting your findings. -## Confirmed limitations - -### ```Array``` passed to ```puts``` +## ```Array``` passed to ```puts``` Passing an Array to ```puts``` results in different output. @@ -37,7 +35,7 @@ puts [1,2,3] [1, 2, 3] ``` -### ```Kernel.raise``` in rescue clause +## ```Kernel.raise``` in rescue clause ```Kernel.raise``` without arguments does not raise the current exception within a rescue clause. -- cgit v1.2.3