mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
@@ -6,7 +6,7 @@
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "mruby"
|
||||
PROJECT_NUMBER = 2.1.2
|
||||
PROJECT_NUMBER = 3.0.0
|
||||
|
||||
PROJECT_BRIEF = "mruby is the lightweight implementation of the Ruby language"
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@ of the Ministry of Economy, Trade and Industry of Japan.
|
||||
|
||||
## How to get mruby
|
||||
|
||||
The preview version 3.0.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.0.0-preview.zip](https://github.com/mruby/mruby/archive/3.0.0-preview.zip)
|
||||
|
||||
The stable version 2.1.2 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.1.2.zip](https://github.com/mruby/mruby/archive/2.1.2.zip)
|
||||
The stable version 3.0.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.0.0.zip](https://github.com/mruby/mruby/archive/3.0.0.zip)
|
||||
|
||||
The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master)
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ To confirm mrdb was installed properly, run mrdb with the `--version` option:
|
||||
|
||||
```bash
|
||||
$ mrdb --version
|
||||
mruby 2.1.2 (2020-08-06)
|
||||
mruby 3.0.0 (2021-03-05)
|
||||
```
|
||||
|
||||
## 2.2 Basic Operation
|
||||
|
||||
+10
-10
@@ -29,7 +29,7 @@ puts [1,2,3]
|
||||
3
|
||||
```
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
```
|
||||
[1, 2, 3]
|
||||
@@ -52,7 +52,7 @@ end
|
||||
|
||||
`ZeroDivisionError` is raised.
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
No exception is raised. Instead you have to do:
|
||||
|
||||
@@ -88,7 +88,7 @@ p Liste.new "foobar"
|
||||
|
||||
` [] `
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
`ArgumentError` is raised.
|
||||
|
||||
@@ -118,7 +118,7 @@ false
|
||||
true
|
||||
```
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
```
|
||||
true
|
||||
@@ -155,7 +155,7 @@ p 'ok'
|
||||
ok
|
||||
```
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
```
|
||||
test.rb:8: undefined method 'test_func' (NoMethodError)
|
||||
@@ -177,7 +177,7 @@ defined?(Foo)
|
||||
nil
|
||||
```
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
`NameError` is raised.
|
||||
|
||||
@@ -194,7 +194,7 @@ alias $a $__a__
|
||||
|
||||
` nil `
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
Syntax error
|
||||
|
||||
@@ -216,7 +216,7 @@ end
|
||||
`ArgumentError` is raised.
|
||||
The re-defined `+` operator does not accept any arguments.
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
` 'ab' `
|
||||
Behavior of the operator wasn't changed.
|
||||
@@ -232,7 +232,7 @@ $ ruby -e 'puts Proc.new {}.binding'
|
||||
#<Binding:0x00000e9deabb9950>
|
||||
```
|
||||
|
||||
#### mruby [2.1.2 (2020-08-06)]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
```
|
||||
$ ./bin/mruby -e 'puts Proc.new {}.binding'
|
||||
@@ -253,7 +253,7 @@ $ ruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)'
|
||||
[[{"a"=>1}], {:b=>2}]
|
||||
```
|
||||
|
||||
#### mruby [mruby 2.1.2]
|
||||
#### mruby [3.0.0 (2021-03-05)]
|
||||
|
||||
```
|
||||
$ ./bin/mruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)'
|
||||
|
||||
@@ -57,7 +57,7 @@ MRB_BEGIN_DECL
|
||||
/*
|
||||
* Patch level string. (optional)
|
||||
*/
|
||||
#define MRUBY_PATCHLEVEL_STR "preview"
|
||||
#define MRUBY_PATCHLEVEL_STR ""
|
||||
|
||||
#ifndef MRUBY_PATCHLEVEL_STR
|
||||
# if MRUBY_PATCHLEVEL < 0
|
||||
@@ -80,17 +80,17 @@ MRB_BEGIN_DECL
|
||||
/*
|
||||
* Release year.
|
||||
*/
|
||||
#define MRUBY_RELEASE_YEAR 2020
|
||||
#define MRUBY_RELEASE_YEAR 2021
|
||||
|
||||
/*
|
||||
* Release month.
|
||||
*/
|
||||
#define MRUBY_RELEASE_MONTH 10
|
||||
#define MRUBY_RELEASE_MONTH 3
|
||||
|
||||
/*
|
||||
* Release day.
|
||||
*/
|
||||
#define MRUBY_RELEASE_DAY 16
|
||||
#define MRUBY_RELEASE_DAY 5
|
||||
|
||||
/*
|
||||
* Release date as a string.
|
||||
|
||||
Reference in New Issue
Block a user