| Age | Commit message (Collapse) | Author |
|
Along with some refactoring on `mruby-math` tests.
|
|
The "a"/"*" specifier of the `mrb_get_args()` function will now return `const mrb_value *`.
This is because it is difficult for the caller to check if it is an array object and write-barrier if necessary.
And it requires calling `mrb_ary_modify()` on the unmodified array object, which is also difficult (this is similar to #5087).
|
|
Files under `test/t` and `mrbgem/*/test` are for tests, not for actual
execution. So symbols in those files need not to be pre-allocated. This
change slightly reduce the memory consumption.
|
|
Where fixnum overflow can happen.
|
|
- Integrate `Fixnum` and `Integer`
- Remove `Integral`
- `int / int -> int`
- Replace `mrb_fixnum()` to `mrb_int()`
- Replace `mrb_fixnum_value()` to `mrb_int_value()`.
- Use `mrb_integer_p()` instead of `mrb_fixnum_p()`
|
|
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT`
- `MRB_USE_FLOAT` => `MRB_USE_FLOAT32`
The former is to use `USE_XXX` naming convention. The latter is to make
sure `float` is 32bit float and not floating point number in general.
|
|
|
|
Format sequence syntax:
%[modifier]specifier
Modifiers:
----------+------------------------------------------------------------
Modifier | Meaning
----------+------------------------------------------------------------
! | Convert to string by corresponding `inspect` instead of
| corresponding `to_s`.
----------+------------------------------------------------------------
Specifiers:
----------+----------------+--------------------------------------------
Specifier | Argument Type | Note
----------+----------------+--------------------------------------------
c | char |
d,i | mrb_int |
f | mrb_float |
l | char*, mrb_int | Arguments are string and length.
n | mrb_sym |
s | char* | Argument is NUL terminated string.
t | mrb_value | Convert to type (class) of object.
v,S | mrb_value |
C | struct RClass* |
T | mrb_value | Convert to real type (class) of object.
Y | mrb_value | Same as `!v` if argument is `true`, `false`
| | or `nil`, otherwise same as `T`.
% | - | Convert to percent sign itself (no argument
| | taken).
----------+----------------+--------------------------------------------
This change will increase the binary size, but replacing all format strings
with new specifiers/modifiers will decrease the size because it reduces
inline expansion of `mrb_obj_value()`, etc. at the caller.
|
|
|
|
Add `assert_match` and `assert_not_match`
|
|
|
|
|
|
|
|
- An exception do not raise when mrbtest fail.
- There are no useful informations in exception message and backtrace.
|
|
|
|
- `mrbgemtest_init()` is needed if `DISABLE_GEMS` is enabled because core
tests are run as part of `mruby-test` mrbgem (moreover, `DISABLE_GEMS` is
disabled when `enable_test` is used in build config).
- For the same reason `mrb_open_core()` etc for core tests is unneeded.
|
|
|
|
|
|
|
|
'mrb_int' to 'int', possible loss of data
|
|
|
|
|
|
|