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
10b1a52b
Unverified
Commit
10b1a52b
authored
May 02, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small updates on documents:
- README.md - CONTRIBUTING.md - doc/limitations.md
parent
dcfc2dbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
21 deletions
+23
-21
CONTRIBUTING.md
CONTRIBUTING.md
+3
-2
README.md
README.md
+5
-3
doc/limitations.md
doc/limitations.md
+15
-16
No files found.
CONTRIBUTING.md
View file @
10b1a52b
...
@@ -56,7 +56,7 @@ on-demand.
...
@@ -56,7 +56,7 @@ on-demand.
Use C++ style comments only for temporary comment e.g. commenting out some code lines.
Use C++ style comments only for temporary comment e.g. commenting out some code lines.
#### Insert a break after the
method
return value:
#### Insert a break after the
function
return value:
int
int
main(void)
main(void)
...
@@ -72,4 +72,5 @@ language itself. Please note the following hints for your Ruby code:
...
@@ -72,4 +72,5 @@ language itself. Please note the following hints for your Ruby code:
#### Comply with the Ruby standard (ISO/IEC 30170:2012)
#### Comply with the Ruby standard (ISO/IEC 30170:2012)
mruby is currently targeting to execute Ruby code which complies to ISO/IEC
mruby is currently targeting to execute Ruby code which complies to ISO/IEC
30170:2012 (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579).
30170:2012 (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579),
unless there's a clear reason, e.g. the latest Ruby has changed behavior from ISO.
README.md
View file @
10b1a52b
...
@@ -40,11 +40,13 @@ We don't have a mailing list, but you can use [GitHub issues](https://github.com
...
@@ -40,11 +40,13 @@ We don't have a mailing list, but you can use [GitHub issues](https://github.com
See the
[
compile.md
](
https://github.com/mruby/mruby/blob/master/doc/guides/compile.md
)
file.
See the
[
compile.md
](
https://github.com/mruby/mruby/blob/master/doc/guides/compile.md
)
file.
##
Running Tests
##
How to Build
To
run the tests
, execute the following from the project's root directory.
To
build mruby
, execute the following from the project's root directory.
$ rake test
$ rake TARGET=
<target>
test
The default
`TARGET`
is
`host`
.
`TARGET`
will be loaded from
`target`
directory.
Note:
`bison`
bundled with MacOS is too old to compile
`mruby`
.
Note:
`bison`
bundled with MacOS is too old to compile
`mruby`
.
Try
`brew install bison`
and follow the instuction shown to update
Try
`brew install bison`
and follow the instuction shown to update
...
...
doc/limitations.md
View file @
10b1a52b
...
@@ -245,8 +245,7 @@ trace (most recent call last):
...
@@ -245,8 +245,7 @@ trace (most recent call last):
## Keyword arguments
## Keyword arguments
mruby keyword arguments behave slightly different from CRuby 2.5
mruby keyword arguments behave slightly different from CRuby 2.5
to make the behavior simpler and less confusing. Maybe in the
to make the behavior simpler and less confusing.
future, the simpler behavior will be adopted to CRuby as well.
#### Ruby [ruby 2.5.1p57 (2018-03-29 revision 63029)]
#### Ruby [ruby 2.5.1p57 (2018-03-29 revision 63029)]
...
@@ -264,6 +263,20 @@ trace (most recent call last):
...
@@ -264,6 +263,20 @@ trace (most recent call last):
-e:1: keyword argument hash with non symbol keys (ArgumentError)
-e:1: keyword argument hash with non symbol keys (ArgumentError)
```
```
## `nil?` redefinition in conditional expressions
Redefinition of
`nil?`
is ignored in conditional expressions.
```
ruby
a
=
"a"
def
a
.
nil?
true
end
puts
(
a
.
nil?
?
"truthy"
:
"falsy"
)
```
Ruby outputs
`falsy`
. mruby outputs
`truthy`
.
## Argument Destructuring
## Argument Destructuring
```
ruby
```
ruby
...
@@ -283,17 +296,3 @@ f(1,[2,3])
...
@@ -283,17 +296,3 @@ f(1,[2,3])
```
```
CRuby gives
`[1,2,3,nil]`
. mruby raises
`NoMethodError`
for
`b`
.
CRuby gives
`[1,2,3,nil]`
. mruby raises
`NoMethodError`
for
`b`
.
## `nil?` redefinition in conditional expressions
Redefinition of
`nil?`
is ignored in conditional expressions.
```
ruby
a
=
"a"
def
a
.
nil?
true
end
puts
(
a
.
nil?
?
"truthy"
:
"falsy"
)
```
Ruby outputs
`falsy`
. mruby outputs
`truthy`
.
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