Commit Graph

13823 Commits

Author SHA1 Message Date
John Bampton c4bfbb2079 Update minimum pre-commit version to latest 2.18.1
Conda, Homebrew and PyPI all have `2.18.1`

https://github.com/pre-commit/pre-commit/releases
https://pypi.org/project/pre-commit/#history
https://formulae.brew.sh/formula/pre-commit
https://anaconda.org/conda-forge/pre-commit

Also run `pre-commit autoupdate`

https://pre-commit.com/#pre-commit-autoupdate
2022-04-26 15:50:49 +10:00
Yukihiro "Matz" Matsumoto a31ff629ba Merge pull request #5700 from jbampton/codeql-on-pull-request-only
Avoid triggering CodeQL on the "push" event for Dependabot branches
2022-04-26 11:09:42 +09:00
Yukihiro "Matz" Matsumoto 50d1bf6214 Merge pull request #5699 from mruby/dependabot/github_actions/github/codeql-action-2
build(deps): bump github/codeql-action from 1 to 2
2022-04-26 08:45:55 +09:00
John Bampton 68ce424889 Avoid triggering CodeQL on the "push" event for Dependabot branches 2022-04-26 01:15:10 +10:00
dependabot[bot] d20ee7298a build(deps): bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 14:08:22 +00:00
Yukihiro "Matz" Matsumoto dd4da14772 symbol.c: remove type mismatch warnings. 2022-04-25 19:14:16 +09:00
Yukihiro "Matz" Matsumoto 73db8c5861 Merge branch 'dearblue-bigint-gem' 2022-04-25 11:21:12 +09:00
Yukihiro "Matz" Matsumoto 118ff0a529 Merge branch 'bigint-gem' of https://github.com/dearblue/mruby into dearblue-bigint-gem 2022-04-25 11:03:39 +09:00
Yukihiro "Matz" Matsumoto f225db4ed6 string.c: move compilation condition to remove unreachable code. 2022-04-25 10:04:39 +09:00
Yukihiro "Matz" Matsumoto 39c8c051f8 numeric.c: mrb_integer_to_str now supports big integers. 2022-04-25 10:03:47 +09:00
Yukihiro "Matz" Matsumoto df09838503 numeric.c: mrb_float_to_integer can return a big integer. 2022-04-25 10:02:54 +09:00
Yukihiro "Matz" Matsumoto 61700dbb0a mruby-sprintf/sprintf.c: raise an error with MRB_NO_FLOAT. 2022-04-25 10:01:09 +09:00
Yukihiro "Matz" Matsumoto b835979bf3 bigint.c: update the error message for too big integers. 2022-04-25 07:31:39 +09:00
Yukihiro "Matz" Matsumoto 0f4769536b src/numeric.c: use mrb_ensure_float_type().
Instead of obsolete `mrb_to_float()` or the combination of
`mrb_float_value(mrb_as_float())`.
2022-04-25 07:29:55 +09:00
Yukihiro "Matz" Matsumoto f45ac65532 fixup! mruby-kernel-ext/kernel.c: use mrb_ensure_integer_type(). 2022-04-25 07:29:21 +09:00
Yukihiro "Matz" Matsumoto 425097c7be mruby-kernel-ext/kernel.c: use mrb_ensure_integer_type().
Instead of obsolete `mrb_to_integer()`.
2022-04-25 07:26:42 +09:00
Yukihiro "Matz" Matsumoto ede3bed9e6 object.c: add new function mrb_ensure_integer_type().
that checks if the value is an `Integer` which may be a big integer,
where existing `mrb_ensure_int_type()` checks if the value is an Integer
**and** fits in `mrb_int`.
2022-04-25 07:21:40 +09:00
Yukihiro "Matz" Matsumoto 2bea39f339 mruby-range-ext/range.c: Range#cover?() takes a range too. 2022-04-24 14:02:00 +09:00
Yukihiro "Matz" Matsumoto 56a35131a4 numeric.c (mrb_cmp): should not raise NoMethodError.
Even when `obj1` does not have `<=>` method.
2022-04-24 14:02:00 +09:00
Yukihiro "Matz" Matsumoto 083691dbd1 variable.c (const_get): stop searching constant before Object.
`String::String` should raise `NameError` exception.
2022-04-24 14:02:00 +09:00
Yukihiro "Matz" Matsumoto 17b4d82f65 variable.c: remove mrb_ prefix from a static function. 2022-04-24 14:02:00 +09:00
Yukihiro "Matz" Matsumoto 8bd77ca332 vm.c: target_class should be retrieved from callinfo. 2022-04-24 14:01:59 +09:00
Yukihiro "Matz" Matsumoto 4afbf8ff01 Merge pull request #5697 from dearblue/mrb_alloca
Hides the class of string objects allocated by `mrb_alloca()`
2022-04-24 14:00:49 +09:00
dearblue 889f1b898f Hides the class of string objects allocated by mrb_alloca()
Prevents retrieval with the `ObjectSpace.each_object` method.
2022-04-23 22:13:30 +09:00
dearblue cc3a213fef Move bigint implementation files to mruby-bigint
Users can now switch to their own implementation of GEM.
However, we do not guarantee that this will not be a problem in the current situation.
This may need to be improved in the future.
2022-04-23 21:19:12 +09:00
dearblue e3e85df13a Removed duplicate prototype declarations for bigint
A part of `include/mruby/bigint.h` has been removed because it duplicates `include/mruby/internal.h`.
2022-04-23 21:11:42 +09:00
Yukihiro "Matz" Matsumoto a4d97934d5 vm.c: check if target_class is NULL (when prepended). 2022-04-22 08:32:18 +09:00
Yukihiro "Matz" Matsumoto bdc244e9b0 mruby-errno/errno.c: fix integer size mixtures. 2022-04-21 14:47:15 +09:00
Yukihiro "Matz" Matsumoto 3be461077d mruby-pack/pack.c: fix integer size mixtures. 2022-04-21 14:47:15 +09:00
Yukihiro "Matz" Matsumoto 9dd45df804 numeric.c (int_pow): should not overflow. 2022-04-21 11:35:52 +09:00
Yukihiro "Matz" Matsumoto e7d0e6fd5a vm.c: fix integer size mixtures. 2022-04-20 16:18:18 +09:00
Yukihiro "Matz" Matsumoto b07ce286f1 fmt_fp.c: fix int and size_t mixture. 2022-04-20 16:11:32 +09:00
Yukihiro "Matz" Matsumoto dd582069ed bigint.c: simplify a loop in mrb_bint_new_float(). 2022-04-20 14:47:40 +09:00
Yukihiro "Matz" Matsumoto b0be2b0176 bigint.c: fix integer size mixture warnings. 2022-04-20 14:47:40 +09:00
Yukihiro "Matz" Matsumoto 791635a8d1 Merge pull request #5695 from dearblue/mrbc-build
Setting `Command#build` correctly in automatic "mrbc" build for presym
2022-04-20 14:47:25 +09:00
Yukihiro "Matz" Matsumoto eb8f7e1b77 Merge pull request #5694 from dearblue/method_added
Move `method_added` method into the `Module`
2022-04-20 08:05:54 +09:00
dearblue be782b7d36 Setting Command#build correctly in automatic "mrbc" build for presym
This was the cause of the command line flag being affected by changes in the parent build.
So, for example, if `mruby-rational` was included, even the automatically added `mrbc` builds included `MRB_USE_RATIONAL`.
2022-04-19 21:48:50 +09:00
dearblue 8bd924c905 Move method_added method into the Module
Previously defined as `BasicObject#method_added`.
2022-04-19 21:00:45 +09:00
Yukihiro "Matz" Matsumoto 4ce0f6dc05 Merge pull request #5692 from jbampton/update-lint-workflow
Fix step names in lint workflow
2022-04-19 07:45:47 +09:00
Yukihiro "Matz" Matsumoto 94585a5902 mruby-binding/bindinc.c: should not mix int and size_t. 2022-04-18 17:47:10 +09:00
Yukihiro "Matz" Matsumoto b38a766427 numeric.c (flo_to_i): use bigint if the value is bigger than mrb_int. 2022-04-18 12:31:15 +09:00
Yukihiro "Matz" Matsumoto 96ff3c31c4 bigint.c: cast to unsigned integer to avoid undefined behavior. 2022-04-18 11:34:30 +09:00
Yukihiro "Matz" Matsumoto 25e6e24c19 bigint.c: adjust integer types to remove warnings. 2022-04-18 11:33:53 +09:00
Yukihiro "Matz" Matsumoto a89130561b bigint.c: remove unused function prototypes. 2022-04-18 11:32:09 +09:00
Yukihiro "Matz" Matsumoto c0b829acce bigint.h: remove unused macro OVMASK. 2022-04-18 11:30:50 +09:00
Yukihiro "Matz" Matsumoto cb353af9ad Merge pull request #5693 from dearblue/each_byte
Improvements to `String#each_byte`
2022-04-18 09:58:59 +09:00
Yukihiro "Matz" Matsumoto c0ef940c90 numeric.c: add boundary checks in Float#to_f.
- check_num_exact() before rounding the float value
- check integer (mrb_int) overflow.
2022-04-17 09:32:04 +09:00
Yukihiro "Matz" Matsumoto 790910b50a codegen.c: genop_3 to take uint16_t instead of uint8_t. 2022-04-17 09:32:04 +09:00
Yukihiro "Matz" Matsumoto 6df1e68e70 Merge pull request #5691 from dearblue/newlit
Avoid creating temporary objects with `new_lit()` in `codegen.c`
2022-04-17 09:18:25 +09:00
dearblue 76d3ea8458 Improvements to String#each_byte
Each byte value is now retrieved inside the loop.
2022-04-16 22:23:34 +09:00