mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #6727 from leviongit/lims/ovld
This commit is contained in:
@@ -371,15 +371,15 @@ Fibers cannot cross C function boundaries. You cannot yield from a
|
||||
fiber inside a C-implemented method. Only `mrb_fiber_yield` at
|
||||
function return is supported.
|
||||
|
||||
### Array Subclasses
|
||||
### Array and String Subclasses
|
||||
|
||||
`Array` does not support instance variables to reduce memory. This
|
||||
means subclassing `Array` and adding `@fields` will raise an error.
|
||||
`Array` and `String` do not support instance variables to reduce memory.
|
||||
This means subclassing `Array` or `String` and adding `@fields` will raise an error.
|
||||
|
||||
### Operator Overriding
|
||||
|
||||
Operators cannot be overridden by user code. Redefining `+` on
|
||||
`String` has no effect on the behavior of the `+` operator.
|
||||
Operators of primitive classes cannot be overridden by user code.
|
||||
Redefining `String#+` has no effect on the behavior of the `+` __operator__.
|
||||
|
||||
### Module Loading Hooks
|
||||
|
||||
|
||||
+2
-1
@@ -111,7 +111,8 @@ Syntax error
|
||||
|
||||
## Operator modification
|
||||
|
||||
An operator can't be overwritten by the user.
|
||||
Operators on some of the primitive classes cannot be overridden, as they are
|
||||
optimized in the VM.
|
||||
|
||||
```ruby
|
||||
class String
|
||||
|
||||
Reference in New Issue
Block a user