Yukihiro "Matz" Matsumoto
798a2b1888
Merge pull request #5774 from dearblue/bidx-assert
...
Fixed assertion in `ARGUMENT_NORMALIZE()` for `bidx`.
2022-08-06 06:43:28 +09:00
dearblue
5bc15dd69b
Fixed assertion in ARGUMENT_NORMALIZE() for bidx.
...
It should be compared to the `irep->nregs` value as is.
At the same time, discovered problems have been fixed.
2022-08-04 22:43:06 +09:00
Yukihiro "Matz" Matsumoto
72f2ac155e
Merge pull request #5772 from mruby/dependabot/github_actions/github/super-linter-4.9.6
...
build(deps): bump github/super-linter from 4.9.5 to 4.9.6
2022-08-04 08:18:08 +09:00
Yukihiro "Matz" Matsumoto
e2decd0528
Merge pull request #5773 from jbampton/run-pre-commit
...
Remove whitespace
2022-08-04 08:17:26 +09:00
John Bampton
791410ba3f
Remove whitespace
...
pre-commit run --all-files
2022-08-04 00:51:03 +10:00
dependabot[bot]
cf8d1eddf6
build(deps): bump github/super-linter from 4.9.5 to 4.9.6
...
Bumps [github/super-linter](https://github.com/github/super-linter ) from 4.9.5 to 4.9.6.
- [Release notes](https://github.com/github/super-linter/releases )
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md )
- [Commits](https://github.com/github/super-linter/compare/v4.9.5...v4.9.6 )
---
updated-dependencies:
- dependency-name: github/super-linter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-08-03 14:05:47 +00:00
Yukihiro "Matz" Matsumoto
84b53fc1ee
Merge pull request #5771 from sakisakira/master
...
Reenabling building for Android NDK
2022-08-03 12:34:12 +09:00
SAkira a.k.a. Akira Suzuki
4610fa55b9
Enabled building for Android again with NDK 25.0.
2022-08-03 08:23:54 +09:00
Yukihiro "Matz" Matsumoto
441c6ea30d
bigint.c (udiv): check out of bound memory access.
2022-08-02 13:36:36 +09:00
Yukihiro "Matz" Matsumoto
75bd101685
AUTHORS: update entries [ci skip]
2022-08-02 09:04:47 +09:00
Yukihiro "Matz" Matsumoto
90e75f983e
Merge pull request #5769 from dearblue/opdef-proc
...
Protected `proc` objects given by `OP_DEF` on registers
2022-08-01 17:46:09 +09:00
Yukihiro "Matz" Matsumoto
51f404be33
Merge pull request #5768 from dearblue/hash-expansion
...
Fix property between `ar_set()` and `ht_init()`.
2022-08-01 17:37:25 +09:00
Yukihiro "Matz" Matsumoto
c32a8a71e9
Merge pull request #5767 from dearblue/fiber-gc
...
Fix `SIGSEGV` caused by GC during fiber initialization
2022-08-01 17:17:29 +09:00
Yukihiro "Matz" Matsumoto
dd00724f30
Merge pull request #5766 from dearblue/red-write-barrier
...
Ignore `MRB_GC_RED` objects in `mrb_field_write_barrier()`
2022-08-01 17:15:54 +09:00
Yukihiro "Matz" Matsumoto
c34bb7825a
mruby-time/time.c: add Time#eql? to compare.
2022-08-01 16:29:35 +09:00
Yukihiro "Matz" Matsumoto
9dfbcbae7b
object.c (mrb_equal): support big-integers.
2022-08-01 16:26:02 +09:00
Yukihiro "Matz" Matsumoto
4fb018d407
object.c (mrb_equal): shortcut per object comparison.
...
To reduce the chance to call mrb_funcall(), which is heavy and
unfriendly to fiber context switches.
2022-08-01 16:24:48 +09:00
Yukihiro "Matz" Matsumoto
585d80e0a7
numeric.c (num_eql): move eql? definition to Numeric class.
...
We no longer need Float#eql? etc.
2022-08-01 16:20:35 +09:00
Yukihiro "Matz" Matsumoto
569a8910af
bigint.c: check division by zero errors.
2022-08-01 13:58:05 +09:00
Yukihiro "Matz" Matsumoto
b5a3fe5276
Merge pull request #5770 from dearblue/doc-1
...
Avoid comparing `mrb_bool` to integer values in the documentation
2022-08-01 13:57:54 +09:00
dearblue
5215b9ce8b
Avoid comparing mrb_bool to integer values in the documentation
2022-07-31 20:38:31 +09:00
Yukihiro "Matz" Matsumoto
9198b9c7db
Merge pull request #5760 from jbampton/fix-type-use-array
...
CodeQL: fix type use array
2022-07-31 08:01:59 +09:00
Yukihiro "Matz" Matsumoto
d28009ebd8
mruby-print/print.rb: reduce explicit return values; ref #5762
...
By making __printstr__ to return nil.
2022-07-31 07:56:06 +09:00
Yukihiro "Matz" Matsumoto
a8e6b840ea
Merge pull request #5762 from dearblue/iso-puts
...
Removed unnecessary ISO section numbers for `Kernel.puts` [ci skip]
2022-07-31 07:55:46 +09:00
dearblue
2d9ecc660e
Fix property between ar_set() and ht_init().
...
If GC occurs in `mrb_realloc()` in `ht_init()` called from `ar_set()`, the following inconsistency occurs:
- If `h_ht_on()` is called before `mrb_realloc()`, `hash->hsh.ht` is referenced instead of `hash->hsh.ea` during GC.
- If the pointer is changed by `ea_adjust()` in `ar_set()`, `hash->hsh.ea` (`hash->hsh.ht`) is referenced in GC before the change.
These modifications can be resolved by changing the order of processing.
However, if a `NoMemoryError` exception is raised, it is presumed that the size of the "AR" will be exceeded and the unintended state will continue.
To prevent this, elements should be added after they have been converted to "HT".
2022-07-30 23:20:48 +09:00
dearblue
43fdce5019
Protected proc objects given by OP_DEF on registers
...
If a GC occurs in `mrb_calloc()` called by `mt_rehash()` inside `mrb_define_method_raw(), the `proc` may be destroyed.
2022-07-30 22:34:50 +09:00
dearblue
a82a3533e6
Fix SIGSEGV caused by GC during fiber initialization
...
GC may occur in the `c->stbase = mrb_malloc()` part of the `fiber_init()` function.
The `SIGSEGV` happens because it references the `c->ci->stack` field without checking `c->ci`.
This is caused by #5272 .
2022-07-30 22:32:02 +09:00
dearblue
2eefee0d6a
Ignore MRB_GC_RED objects in mrb_field_write_barrier()
2022-07-30 22:32:01 +09:00
Yukihiro "Matz" Matsumoto
9e38aa8948
Merge pull request #5761 from jbampton/fix-grammar
...
docs: fix grammar
2022-07-30 15:56:48 +09:00
dearblue
2e6d2abf09
Removed unnecessary ISO section numbers for Kernel.puts [ci skip]
...
The `Kernel.puts` method is defined in the `mrbgems/mruby-print/mrblib/print.rb` file.
2022-07-30 11:54:23 +09:00
Yukihiro "Matz" Matsumoto
b77b8f4deb
numeric.c (flo_ceil_floor): negate after converting integer to float.
...
Otherwise integer negate may overflow.
2022-07-30 09:08:42 +09:00
Yukihiro "Matz" Matsumoto
9d774bc011
numeric.c (flo_ceil_floor): return bigint if possible.
2022-07-30 09:08:02 +09:00
Yukihiro "Matz" Matsumoto
eb392cb643
numeric.c (mrb_float_to_integer): check for RangeError.
...
Otherwise flo_to_i raises FloatDomainError instead.
2022-07-30 09:06:49 +09:00
Yukihiro "Matz" Matsumoto
e4bcd8a96a
numeric.c (mrb_float_to_integer): unify with flo_to_i().
2022-07-30 09:05:21 +09:00
Yukihiro "Matz" Matsumoto
5af98f2088
numeric.c (flo_ceil_floor): add exact number check.
2022-07-30 09:01:24 +09:00
Yukihiro "Matz" Matsumoto
aebf75fed4
bigint.c (mrb_bint_as_int): change overflow message.
...
From "integer too big" to "integer out of range" because the integer can
be too small if it's negative.
2022-07-30 08:58:30 +09:00
Yukihiro "Matz" Matsumoto
b8d3bc0eae
numeric.c: move FloatDomainError description to the sufficient place.
2022-07-30 08:46:06 +09:00
Yukihiro "Matz" Matsumoto
89b0c7d7ab
complex.c (mrb_complex_to_i): return bigint if possible.
2022-07-30 08:44:15 +09:00
Yukihiro "Matz" Matsumoto
273ca4d4f6
tasks/toolchains/gcc.rake: remove -lm on Windows; #5757
2022-07-30 07:33:45 +09:00
Yukihiro "Matz" Matsumoto
6da34fa735
numeric.c (int_div): add checks for division by zero.
2022-07-29 17:48:02 +09:00
John Bampton
9521e4e974
docs: fix grammar
2022-07-29 16:30:46 +10:00
John Bampton
5cae37abe5
CodeQL: fix type use array
2022-07-29 14:44:02 +10:00
Yukihiro "Matz" Matsumoto
387f383eeb
bigint.c (mrb_sizeinbase): cast to remove a signedness warning.
2022-07-29 10:26:04 +09:00
Yukihiro "Matz" Matsumoto
5df3f8221d
bigint.c (lzb): check x==0 before calling clz().
...
In theory, we should not call lzb() with 0, and we assume checks are
done before calling it. But we got a report that we call lzb(0) in some
use-case. We could not reproduce the issue, so we add this guard.
2022-07-29 10:24:41 +09:00
Yukihiro "Matz" Matsumoto
64ea7f0930
doc/guides/link.md: fixed typo.
2022-07-29 10:24:41 +09:00
Yukihiro "Matz" Matsumoto
23cb2a73ff
bigint.c (mpz_move): reduce copying of digits arrays.
2022-07-29 10:24:41 +09:00
Yukihiro "Matz" Matsumoto
dcf9e32870
Merge pull request #5759 from jbampton/lint-modified-files
...
Super-Linter: Lint modified files only
2022-07-29 10:24:01 +09:00
John Bampton
9ddc6c1915
Super-Linter: Lint modified files only
...
Following the basic example shown here
https://github.com/github/super-linter#example-connecting-github-action-workflow
2022-07-29 09:19:28 +10:00
Yukihiro "Matz" Matsumoto
33b11daca7
Merge pull request #5758 from jbampton/pre-commit-autoupdate
...
pre-commit autoupdate
2022-07-29 07:43:59 +09:00
John Bampton
718547be2b
pre-commit autoupdate
...
https://pre-commit.com/#pre-commit-autoupdate
2022-07-29 08:29:12 +10:00