| Age | Commit message (Collapse) | Author |
|
Get object properties after `mrb_get_args()`
|
|
ref. #5613
I checked with Valgrind, and the methods that can cause use-after-free are `Array#rotate`, `Array#rotate!`, and `String#byteslice`.
Since `String#rindex` uses `RSTRING_LEN()` indirectly inside the function, no reference to the out-of-bounds range is generated.
|
|
|
|
|
|
|
|
Which represent `obj[int]` and `obj[int]=val` respectively where `obj`
is either `string`, `array` or `hash`, so that index access could be
faster. When `obj` is not assumed type or `R(a+1)` is not integer, the
instructions fallback to method calls.
|
|
|
|
|
|
Consistent naming: `integer` to represent integer packed in `mrb_value`
instead of `int`.
|
|
Consistent naming: `integer` to represent integer packed in `mrb_value`
instead of `inum`.
|
|
|
|
To reduce number of string allocation.
|
|
Replace them by `mrb_ensure_string_type()`.
|
|
- `#include <math.h>` is done in `mruby.h`.
Eliminate the need to worry about the `MRB_NO_FLOAT` macro.
- Include mruby header files before standard header files.
If the standard header file is already placed before `mruby.h`, the standard header file added in the future tends to be placed before `mruby.h`.
This change should some reduce the chances of macros that must be defined becoming undefined in C++ or including problematic header files in a particular mruby build configuration.
|
|
|
|
Use `mrb_fixnum_value()` only when you are absolutely sure that the
value is within `Fixnum` range, i.e. 31 bits signed integer at least.
|
|
The `Fixnum` class is no longer provided by `mruby`.
|
|
- stdlib.h
- stddef.h
- stdint.h
- stdarg.h
- limits.h
- float.h
|
|
The `MRB_OBJ_ALLOC()` macro function returns a pointer of the type corresponding to the constant literal defined in `enum mrb_vtype`.
|
|
|
|
* `mrb_cstr_to_inum()`
* `mrb_cstr_to_dbl()`
|
|
|
|
Instead of using copyrighted `strtod`, now use the public domain
implementation of `strtod` by Yasuhiro Matsumoto (@mattn). The function
has been renamed to `mrb_float_read()`; ref #5460 as well.
|
|
Consistent number conversion function names:
* `mrb_value` to immediate (C) value
* `mrb_int()` -> `mrb_as_int()`
* `mrb_to_flo()` -> `mrb_as_float()`
* `mrb_value` to `mrb_value` (converted)
* `mrb_to_int()'
* `mrb_Integer()` - removed
* `mrb_Float()` -> `mrb_to_float`
Consistent function name (avoid `_flo` suffix):
* `mrb_div_flo()` -> `mrb_div_float`
|
|
|
|
|
|
When the receiver is the instance of subclass of `String`.
- `String#each_char`
- `String#each_line`
- `String#partition`
|
|
The GitHub Super Linter is a more robust and better supported
tool than the current GitHub Actions we are using.
Running these checks:
ERROR_ON_MISSING_EXEC_BIT: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_EDITORCONFIG: true
VALIDATE_MARKDOWN: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_YAML: true
https://github.com/marketplace/actions/super-linter
https://github.com/github/super-linter
Added the GitHub Super Linter badge to the README.
Also updated the pre-commit framework and added
more documentation on pre-commit.
Added one more pre-commit check: check-executables-have-shebangs
Added one extra check for merge conflicts to our
GitHub Actions.
EditorConfig and Markdown linting.
Minor grammar and spelling fixes.
Update linter.yml
|
|
This reverts commit dc51d89ac22acc60b9bfeed87115863565b74085.
|
|
Instead of including `mruby/presym.h` everywhere, we provided the
fallback `mruby/presym.inc` under `include/mruby` directory, and specify
`-I<build-dir>/include` before `-I<top-dir>/include` in `presym.rake`.
So even when someone drops `-I<build-dir>/include` in compiler options,
it just compiles without failure.
|
|
Addressed an issue where existing programs linking `libmruby.a` could only
be built by adding `<build-dir>/include` to compiler's include path.
|
|
The first byte of UTF-8 character should not be `80..c1`.
|
|
|
|
|
|
Also avoid using `uint64_t`.
|
|
|
|
|
|
|
|
|
|
I misunderstand the meaning of #4483. Sorry.
|
|
- Remove `mrb_ssize`
- Fix `MRB_FIXNUM_{MIN,MAX}` to 32 bits on `MRB_NAN_BOXING`
|
|
Redirect `mrb_str_to_str` to `mrb_obj_as_string` via C macro.
Inspired by #5082
|
|
Rename new functions:
- `mrb_convert_type(mrb,val,type,tname,method)`
=> `mrb_type_convert(mrb,val,type,tname,method)`
- `mrb_check_convert_type(mrb,val,type,tname,method)`
=> `mrb_type_convert_check(mrb,val,type,tname,method)`
Old names are defined by macros (support `tname` drop and
`char*` => `mrb_sym` conversion).
|
|
- 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()`
|
|
We still have `#define MRB_TT_FIXNUM MRB_TT_INTEGER` for compatibility.
|
|
* The `Fixnum` constant is now an alias for the `Integer` class.
* Remove `struct mrb_state::fixnum_class` member.
If necessary, use `struct mrb_state::integer_class` instead.
|
|
- `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.
|
|
Changes:
- `pool format is completely replaced
- supported types: `STR`, `INT32`, `INT64`, `FLOAT`
- `FLOAT` may be replaced by binary representation in the future
- insert `NUL` after string literals in `mrb` files
- `irep->pool` no longer store values in `mrb_value`
- instead it stores in `mrb_pool_value`
- less allocation
- `mrb_irep` can be stored in ROM
|
|
- `mrb_convert_type`
- `mrb_check_convert_type`
Those function no longer take `tname` string representation of desired
type, and take method symbols instead of `const char*` names. This is
incompatible change. I hope no third-party gems use those functions.
|
|
since mrb_str_to_str() also does it.
|