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
74e7c4aa
Commit
74e7c4aa
authored
Sep 03, 2019
by
KOBAYASHI Shuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add to `doc/limitations.md` about `nil?` redefinition; ref
49967097
[ci skip]
parent
148fffa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
doc/limitations.md
doc/limitations.md
+17
-3
No files found.
doc/limitations.md
View file @
74e7c4aa
...
...
@@ -126,7 +126,7 @@ true
true
```
##
defined?
##
`defined?`
The
`defined?`
keyword is considered too complex to be fully
implemented. It is recommended to use
`const_defined?`
and
...
...
@@ -186,7 +186,7 @@ The re-defined `+` operator does not accept any arguments.
` 'ab' `
Behavior of the operator wasn't changed.
##
Kernel#binding
is not supported
##
`Kernel#binding`
is not supported
`Kernel#binding`
method is not supported.
...
...
@@ -238,7 +238,7 @@ Destructured arguments (`b` and `c` in above example) cannot be accessed
from the default expression of optional arguments and keyword arguments,
since actual assignment is done after the evaluation of those default
expressions. Thus:
```
ruby
def
f
(
a
,(
b
,
c
),
d
=
b
)
p
[
a
,
b
,
c
,
d
]
...
...
@@ -247,3 +247,17 @@ f(1,[2,3])
```
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