Add to `doc/limitations.md` about `nil?` redefinition; ref [ci skip]
MODIFY
doc/limitations.md
doc/limitations.md
@@ -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.
@@ -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`.

Add to `doc/limitations.md` about `nil?` redefinition; ref 4996709 [ci skip]