John Bampton
888931c103
Fix grammar and case of Ruby
2022-04-15 11:32:32 +10:00
Yukihiro "Matz" Matsumoto
5f1ed381ae
Merge pull request #5688 from jbampton/fix-spelling
...
Fix spelling in `doc/mruby3.2.md`
2022-04-15 07:44:50 +09:00
John Bampton
aa4049e5e6
Fix spelling in doc/mruby3.2.md
2022-04-15 07:06:23 +10:00
Yukihiro "Matz" Matsumoto
eba74c038e
string.c: avoid a local variable.
2022-04-14 10:55:00 +09:00
Yukihiro "Matz" Matsumoto
15af07562a
variable.c: use size_t to avoid integer type mismatch.
2022-04-14 10:54:37 +09:00
Yukihiro "Matz" Matsumoto
3c96ee704b
fiber.c: cast integer to avoid a warning.
2022-04-14 10:53:58 +09:00
Yukihiro "Matz" Matsumoto
fef7deabd5
doc/mruby3.2.md: add description about multi-precision integers.
2022-04-12 20:28:47 +09:00
Yukihiro "Matz" Matsumoto
2f918f1926
errno.c: fix int and mrb_int mixture.
...
`strerror(3) takes `int` not `mrb_int`.
2022-04-12 16:11:01 +09:00
Yukihiro "Matz" Matsumoto
0e975c1571
bigint.h: simplified the condition.
2022-04-12 15:06:28 +09:00
Yukihiro "Matz" Matsumoto
ff2b21ddf3
Merge pull request #5687 from dearblue/sysfail
...
Must the `mrb_sys_fail()` function raise an exception
2022-04-12 08:59:50 +09:00
Yukihiro "Matz" Matsumoto
0ec5c3e493
bigint.c (mrb_bint_cmp): avoid object allocation for comparison.
2022-04-11 11:12:47 +09:00
Yukihiro "Matz" Matsumoto
f63f57391f
bigint.c: fix bugs caused by integer size variety.
2022-04-11 11:04:22 +09:00
Yukihiro "Matz" Matsumoto
30f6669d09
bigint.h: use int64_t as mp_limb if MRB_INT64 is set.
2022-04-11 11:03:08 +09:00
Yukihiro "Matz" Matsumoto
bafca84c54
dump.c: should dump INT64 with MRB_32BIT.
2022-04-11 11:00:49 +09:00
dearblue
ef5ae084d7
Must the mrb_sys_fail() function raise an exception
...
Normal return of control from the `mrb_sys_fail()` function has unexpected results.
Example: double free, malloc with huge size used as error integer
The following is an example of an actual crash:
```console
% cat crash.rb
def SystemCallError._sys_fail(*a)
nil
end
File.readlink("/404")
% bin/mruby crash.rb
zsh: segmentation fault (core dumped) bin/mruby crash.rb
```
2022-04-10 21:36:59 +09:00
Yukihiro "Matz" Matsumoto
676e9bcf81
bigint.h: use LL suffix for bigger integer literals.
2022-04-10 19:55:45 +09:00
Yukihiro "Matz" Matsumoto
dda1626105
bigint.c: wrong position of break statement.
2022-04-10 19:55:22 +09:00
Yukihiro "Matz" Matsumoto
2f832f4479
bigint.c: fix infinite loop bugs.
2022-04-10 19:04:20 +09:00
Yukihiro "Matz" Matsumoto
e14782e8a1
vm.c: fixed wrong compilation condition for MRB_INT32.
2022-04-10 19:03:37 +09:00
Yukihiro "Matz" Matsumoto
17a31efa8a
vm.c: adjust size of int types.
2022-04-10 19:03:01 +09:00
Yukihiro "Matz" Matsumoto
b3420faafd
class.c: use mrb_ssize to keep the array length.
2022-04-10 19:02:17 +09:00
Yukihiro "Matz" Matsumoto
b22044fca6
vm.c: cipush() to take uint16_t argc.
2022-04-10 17:36:03 +09:00
Yukihiro "Matz" Matsumoto
4260ce83a9
vm.c: avoid bare macro constant reference. wrap it by defined().
2022-04-09 23:43:03 +09:00
Yukihiro "Matz" Matsumoto
bbf4423f4c
bigint.c: y->sz > 2 can be fit in mrb_int.
2022-04-09 18:21:45 +09:00
Yukihiro "Matz" Matsumoto
88e0c64ffc
class.c: fix bugs in inline method cache.
2022-04-09 17:16:12 +09:00
Yukihiro "Matz" Matsumoto
b1d0296a93
class.c: clear method cache after remove_method.
2022-04-09 17:16:12 +09:00
Yukihiro "Matz" Matsumoto
c30e6ebe12
gc.c: add red (persistent no scan) color in the comment [ci skip]
2022-04-09 17:16:12 +09:00
Yukihiro "Matz" Matsumoto
c8c083cb75
codegen.c: need to pack argument when n==13 too.
...
Because we have extra 2 arguments coming (kw and rhs).
2022-04-09 17:16:12 +09:00
Yukihiro "Matz" Matsumoto
55b526167b
test/bigint.rb: add test for multi-precision integers.
2022-04-09 17:16:11 +09:00
Yukihiro "Matz" Matsumoto
f33537f4fd
dump.c: fix a bug in dump data size of BIGINT pool.
...
Was dumping extra NUL (\0) after the data.
2022-04-09 17:16:11 +09:00
Yukihiro "Matz" Matsumoto
a252893292
load.c: should not skip bigint literal length.
2022-04-09 17:16:11 +09:00
Yukihiro "Matz" Matsumoto
dcaf4083d5
src/bigint.c: implement multi-precision integer.
...
To enable multi-precision integer support, you need to link
`mruby-bigint` mrbgem. The gem itself is empty but it turns on
the "bigint" support.
2022-04-09 17:16:10 +09:00
Yukihiro "Matz" Matsumoto
e3c20b7319
build_config: use full-core gembox on host configuration (except default)
2022-04-06 22:51:47 +09:00
Yukihiro "Matz" Matsumoto
5a27b69aa6
numeric.c: remove duplicated code in int_divmod.
2022-04-06 17:04:40 +09:00
Yukihiro "Matz" Matsumoto
5bef8e4135
numeric.c: the result of -5.div(2) should be -3 as CRuby does.
2022-04-06 17:04:40 +09:00
Yukihiro "Matz" Matsumoto
6ed21ead21
Merge pull request #5682 from dearblue/heap_p
...
Fixed bounds check for `heap_p()` function in `src/gc.c`
2022-04-06 17:04:32 +09:00
Yukihiro "Matz" Matsumoto
f9378f45b9
Merge pull request #5684 from jbampton/run-super-linter-once
...
Run Super-Linter only once
2022-04-05 14:12:43 +09:00
Yukihiro "Matz" Matsumoto
c9c63846e9
Merge pull request #5683 from mruby/dependabot/github_actions/github/super-linter-4.9.2
...
build(deps): bump github/super-linter from 4.9.1 to 4.9.2
2022-04-05 14:11:59 +09:00
John Bampton
b4c70fbe51
Run Super-Linter only once
2022-04-05 00:18:29 +10:00
dependabot[bot]
70aded64f7
build(deps): bump github/super-linter from 4.9.1 to 4.9.2
...
Bumps [github/super-linter](https://github.com/github/super-linter ) from 4.9.1 to 4.9.2.
- [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.1...v4.9.2 )
---
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-04-04 14:08:43 +00:00
Yukihiro "Matz" Matsumoto
3cf291f722
vm.c: create break object before clearing GC arena.
...
Otherwise it possibly cause use-after-free.
2022-04-04 12:26:52 +09:00
dearblue
87c9bd0754
Fixed bounds check for heap_p() function in src/gc.c
...
One extra element was included.
2022-04-03 22:14:42 +09:00
Yukihiro "Matz" Matsumoto
8aec568fc5
range.c: detect integer overflow.
2022-04-03 18:39:40 +09:00
Yukihiro "Matz" Matsumoto
3dabd18dcc
errno.c: resolve signedness warning.
2022-04-02 18:25:13 +09:00
Yukihiro "Matz" Matsumoto
b99c389ec3
internal.h: aggregate internal functions.
...
Internal functions can only be called from within the library.
Functions listed in `mruby/internal.h` can be called from:
* core (src/*.c)
* gems (mrbgems/**/*.c)
But not from the application linked with `libmruby`.
2022-04-02 18:25:13 +09:00
Yukihiro "Matz" Matsumoto
00acae117d
vm.c: target class may be NULL.
2022-04-01 16:40:06 +09:00
Yukihiro "Matz" Matsumoto
d1f1b4ea38
cdump.c: add const qualifier for line number arrays.
2022-04-01 15:02:39 +09:00
Yukihiro "Matz" Matsumoto
9de6065ae2
Merge pull request #5680 from jbampton/pre-commit-autoupdate
...
pre-commit autoupdate
2022-04-01 14:57:08 +09:00
John Bampton
cc380c6546
pre-commit autoupdate
...
https://pre-commit.com/#pre-commit-autoupdate
2022-04-01 08:26:40 +10:00
Yukihiro "Matz" Matsumoto
a3f2c95334
codegen.c: skip overwritten MOVE instructions.
2022-03-30 15:34:40 +09:00