Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
405b5225
Unverified
Commit
405b5225
authored
Mar 09, 2021
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Mar 09, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5377 from jbampton/fix-grammar
chore: fix grammar
parents
f2b35294
3c1ce680
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
33 additions
and
33 deletions
+33
-33
README.md
README.md
+1
-1
doc/guides/compile.md
doc/guides/compile.md
+7
-7
doc/guides/debugger.md
doc/guides/debugger.md
+4
-4
doc/guides/gc-arena-howto.md
doc/guides/gc-arena-howto.md
+4
-4
doc/guides/mrbconf.md
doc/guides/mrbconf.md
+1
-1
doc/guides/mrbgems.md
doc/guides/mrbgems.md
+6
-6
doc/limitations.md
doc/limitations.md
+3
-3
doc/mruby3.md
doc/mruby3.md
+3
-3
doc/opcode.md
doc/opcode.md
+2
-2
mrbgems/mruby-method/README.md
mrbgems/mruby-method/README.md
+1
-1
mrbgems/mruby-sleep/README.md
mrbgems/mruby-sleep/README.md
+1
-1
No files found.
README.md
View file @
405b5225
...
...
@@ -6,7 +6,7 @@ mruby is the lightweight implementation of the Ruby language complying to (part
of) the
[
ISO standard
][
ISO-standard
]
. Its syntax is Ruby 2.x compatible.
mruby can be linked and embedded within your application. We provide the
interpreter program "mruby" and the interactive mruby shell "mirb" as examples.
interpreter program "mruby"
,
and the interactive mruby shell "mirb" as examples.
You can also compile Ruby programs into compiled byte code using the mruby
compiler "mrbc". All those tools reside in the "bin" directory. "mrbc" is
also able to generate compiled byte code in a C source file, see the "mrbtest"
...
...
doc/guides/compile.md
View file @
405b5225
...
...
@@ -19,10 +19,10 @@ Optional:
*
Bison (to compile
`mrbgems/mruby-compiler/core/parse.y`
)
*
gperf (to compile
`mrbgems/mruby-compiler/core/keywords`
)
Note that
`bison`
bundled with
M
acOS is too old to compile
`mruby`
.
Note that
`bison`
bundled with
m
acOS is too old to compile
`mruby`
.
Try
`brew install bison`
and follow the instruction shown to update
the
`$PATH`
to compile
`mruby`
. We also encourage to upgrade
`ruby`
on
M
acOS in similar manner.
the
`$PATH`
to compile
`mruby`
. We also encourage
you
to upgrade
`ruby`
on
m
acOS in similar manner.
## Build
...
...
@@ -52,7 +52,7 @@ All tools necessary to compile mruby can be set or modified here.
We wish you submit a pull-request to
`build_config/PLATFORM.rb`
, once you
created a new configuration for a new platform.
Inside
of
the configuration file, the following options can be
Inside the configuration file, the following options can be
configured based on your environment.
### Toolchains
...
...
@@ -135,7 +135,7 @@ end
C Compiler has header searcher to detect installed library.
If you need a include path of header file use
`search_header_path`
:
If you need a
n
include path of header file use
`search_header_path`
:
```
ruby
# Searches ```iconv.h```.
...
...
@@ -311,7 +311,7 @@ conf.enable_cxx_exception
#### C++ exception disabling.
If your compiler does not support C++ and you want to ensure
If your compiler does not support C++
,
and you want to ensure
you don't use mrbgem written in C++, you can explicitly disable
C++ exception, add following:
...
...
@@ -360,7 +360,7 @@ directory.
### Mrbtest in Cross-Compilation
In cross compilation, you can run
`mrbtest`
on emulator if
In cross compilation, you can run
`mrbtest`
on
an
emulator if
you have it by changing configuration of test runner.
```
ruby
...
...
doc/guides/debugger.md
View file @
405b5225
...
...
@@ -114,7 +114,7 @@ b [class:]method
The breakpoint will be ordered in serial from 1.
The number, which was given to the deleted breakpoint, will never be given to another breakpoint again.
You can give multiple breakpoints to specified the line number and method.
You can give multiple breakpoints to
the
specified the line number and method.
Be ware that breakpoint command will not check the validity of the class name and method name.
You can get the current breakpoint information by the following options.
...
...
@@ -165,7 +165,7 @@ Example:
(foo.rb:1) delete
```
This will delete all
of
the breakpoints.
This will delete all the breakpoints.
```
(foo.rb:1) delete 1 3
...
...
@@ -192,7 +192,7 @@ Example:
(foo.rb:1) disable
```
Use
`disable`
if you would like to disable all
of
the breakpoints.
Use
`disable`
if you would like to disable all the breakpoints.
```
(foo.rb:1) disable 1 3
...
...
@@ -324,7 +324,7 @@ expr: expression
The expression is mandatory.
The displayed expressions will be serially ordered from 1.
If an exception occurs, the exception information will be displayed and the debugging will be continued.
If an exception occurs, the exception information will be displayed
,
and the debugging will be continued.
Example:
...
...
doc/guides/gc-arena-howto.md
View file @
405b5225
...
...
@@ -11,13 +11,13 @@ execution speed. This is an error indicating overflow of "GC arena"
implementing "conservative GC".
GC (garbage collector) must ensure that object is "alive", in other
words, that it is referenced by somewhere from program. This can be
words, that it is referenced by somewhere from
the
program. This can be
determined by checking if the object can be directly or indirectly
referenced by root. The local variables, global variables and
constants etc are root.
If program execution is performed inside mruby VM, there is nothing to
worry about because GC can access all roots owned by VM.
worry about because GC can access all roots owned by
the
VM.
The problem arises when executing C functions. The object referenced
by C variable is also "alive", but mruby GC cannot aware of this, so
...
...
@@ -38,7 +38,7 @@ The biggest problem is we have no way to access to the stack area in
portable way. Therefore, we cannot use this method if we'd like to
implement highly portable runtime, like mruby.
So we came up with an
an
other plan to implement "conservative GC" in mruby.
So we came up with another plan to implement "conservative GC" in mruby.
Again, the problem is when an object which was created in C function, becomes
no longer referenced in the Ruby world, and cannot be treated as garbage.
...
...
@@ -161,7 +161,7 @@ Please note that the final `inspect` representation of entire array
was created before the call of
`mrb_gc_arena_restore()`
. Otherwise,
required temporal object may be deleted by GC.
We may have a usecase where after creating many temporal objects, we'd
We may have a
n
usecase where after creating many temporal objects, we'd
like to keep some of them. In this case, we cannot use the same idea
in
`ary_inspect()`
like appending objects to existing one.
Instead, after
`mrb_gc_arena_restore()`
, we must re-register the objects we
...
...
doc/guides/mrbconf.md
View file @
405b5225
...
...
@@ -165,7 +165,7 @@ largest value of required alignment.
*
Please try if
`MRB_USE_LINK_TIME_RO_DATA_P`
is not available.
*
The
`mrb_ro_data_p()`
function is implemented by the user in an arbitrary file.
*
The prototype declaration is
`mrb_bool mrb_ro_data_p(const char *ptr)`
.
*
Return
`TRUE`
if
`ptr`
is in read-only section, otherwise return
`FALSE`
.
*
Return
`TRUE`
if
`ptr`
is in
the
read-only section, otherwise return
`FALSE`
.
## Other configuration.
...
...
doc/guides/mrbgems.md
View file @
405b5225
...
...
@@ -52,8 +52,8 @@ For specifying commit hash to checkout use `:checksum_hash` option:
conf
.
gem
mgem:
'mruby-redis'
,
checksum_hash:
'3446d19fc4a3f9697b5ddbf2a904f301c42f2f4e'
```
If there
is
missing dependencies, mrbgem dependencies solver will reference
mrbgem from core or mgem-list.
If there
are
missing dependencies, mrbgem dependencies solver will reference
mrbgem from
the
core or mgem-list.
To pull all gems from remote GIT repository on build, call
```rake -p```
,
or
```rake --pull-gems```
.
...
...
@@ -80,7 +80,7 @@ end
```
As mentioned, the GemBox uses the same conventions as
`MRuby::Build`
. The GemBox
must be saved with a
`.gembox`
extension inside the
`mrbgems`
directory to
to
be
must be saved with a
`.gembox`
extension inside the
`mrbgems`
directory to be
picked up by mruby.
To use this example GemBox, we save it as
`custom.gembox`
inside the
`mrbgems`
...
...
@@ -149,7 +149,7 @@ The mrbgems build process will use this specification to compile Object and Ruby
files. The compilation results will be added to
`lib/libmruby.a`
. This file exposes
the GEM functionality to tools like
`mruby`
and
`mirb`
.
The following properties can be set inside
of
your
`MRuby::Gem::Specification`
for
The following properties can be set inside your
`MRuby::Gem::Specification`
for
information purpose:
*
`spec.license`
or
`spec.licenses`
(A single license or a list of them under which this GEM is licensed)
...
...
@@ -230,7 +230,7 @@ end
```
In case your GEM has more complex build requirements you can use
the following options additionally inside
of
your GEM specification:
the following options additionally inside your GEM specification:
*
`spec.cc.flags`
(C compiler flags)
*
`spec.cc.defines`
(C compiler defines)
...
...
@@ -245,7 +245,7 @@ the following options additionally inside of your GEM specification:
*
`spec.test_objs`
(Object test files for integration into mrbtest)
*
`spec.test_preload`
(Initialization files for mrbtest)
You also can use
`spec.mruby.cc`
and
`spec.mruby.linker`
to add extra global parameters for compiler and linker.
You also can use
`spec.mruby.cc`
and
`spec.mruby.linker`
to add extra global parameters for
the
compiler and linker.
### include_paths and dependency
...
...
doc/limitations.md
View file @
405b5225
...
...
@@ -54,7 +54,7 @@ end
#### mruby [3.0.0 (2021-03-05)]
No exception is raised. Instead you have to do:
No exception is raised. Instead
,
you have to do:
```
ruby
begin
...
...
@@ -66,7 +66,7 @@ end
## Fiber execution can't cross C function boundary
mruby's
`Fiber`
is implemented
in a similar wa
y to Lua's co-routine. This
mruby's
`Fiber`
is implemented
similarl
y 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.
...
...
@@ -95,7 +95,7 @@ p Liste.new "foobar"
## Method visibility
For simplicity reasons no method visibility (public/private/protected) is
supported. Those methods are defined but they are dummy methods.
supported. Those methods are defined
,
but they are dummy methods.
```
ruby
class
VisibleTest
...
...
doc/mruby3.md
View file @
405b5225
...
...
@@ -76,8 +76,8 @@ to be default `mrb_value` representation. Now the default is
## `MRB_WORD_BOXING`
Pack
`mrb_value`
in an
`intptr_t`
integer. Consumes less
memory compared to
`MRB_NO_BOXING`
especially on 32
bit
platforms.
`Fixnum`
size is 31 bits so some integer values
memory compared to
`MRB_NO_BOXING`
especially on 32
-
bit
platforms.
`Fixnum`
size is 31 bits
,
so some integer values
does not fit in
`Fixnum`
integers.
## `MRB_NAN_BOXING`
...
...
@@ -117,7 +117,7 @@ Instructions that access pool[i]/syms[i] where i>255.
*
`OP_STRING16`
*
`OP_LOADSYM16`
Instructions that load a 32
bit integer.
Instructions that load a 32
-
bit integer.
*
`OP_LOADI32`
...
...
doc/opcode.md
View file @
405b5225
# The new bytecode
We will reimplement VM to use 8bit instruction code. By
We will reimplement
the
VM to use 8bit instruction code. By
bytecode, we mean real byte code. The whole purpose is
reducing the memory consumption of mruby VM.
# Instructions
Instructions are bytes. There can be 256 instructions. Currently we
Instructions are bytes. There can be 256 instructions. Currently
,
we
have 94 instructions. Instructions can take 0 to 3 operands.
## operands
...
...
mrbgems/mruby-method/README.md
View file @
405b5225
mruby-method
===
A implementation of class
**Method**
and
**UnboundMethod**
for mruby
A
n
implementation of class
**Method**
and
**UnboundMethod**
for mruby
```
ruby
p
Enumerable
.
instance_method
(
:find_all
).
source_location
...
...
mrbgems/mruby-sleep/README.md
View file @
405b5225
...
...
@@ -4,7 +4,7 @@ mruby sleep module
## install by mrbgems
-
add
conf.gem
line to your build configuration.
-
add
`conf.gem`
line to your build configuration.
```
ruby
MRuby
::
Build
.
new
do
|
conf
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment