summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2021-09-09Merge pull request #5548 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/github/super-linter-4.7.2 build(deps): bump github/super-linter from 4.7.1 to 4.7.2
2021-09-08build(deps): bump github/super-linter from 4.7.1 to 4.7.2dependabot[bot]
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.7.1 to 4.7.2. - [Release notes](https://github.com/github/super-linter/releases) - [Changelog](https://github.com/github/super-linter/blob/master/docs/release-process.md) - [Commits](https://github.com/github/super-linter/compare/v4.7.1...v4.7.2) --- updated-dependencies: - dependency-name: github/super-linter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
2021-09-08array.c: refactor `mrb_ary_splice`.Yukihiro "Matz" Matsumoto
2021-09-07value.h: fixed address comparison on macOS.Yukihiro "Matz" Matsumoto
2021-09-07object.c: rename `mrb_to_int` to `mrb_to_integer`.Yukihiro "Matz" Matsumoto
Consistent naming: `integer` to represent integer packed in `mrb_value` instead of `int`.
2021-09-07string.h: rename `mrb_str_to_inum` to `mrb_str_to_integer`.Yukihiro "Matz" Matsumoto
Consistent naming: `integer` to represent integer packed in `mrb_value` instead of `inum`.
2021-09-07eval.c: if the parser raises an exception without an error messageYukihiro "Matz" Matsumoto
`eval` would have crashed in formatting.
2021-09-07eval.c: check length of the file name.Yukihiro "Matz" Matsumoto
It should be lexx than `UINT16_MAX`. If you don't check here, the parser would raise an exception.
2021-09-07codegen.c: improve exception handling in `generate_code`.Yukihiro "Matz" Matsumoto
- remove `mrb_jmpbuf` from `codegen_scope` - unify exception handling of `mrb_state` and `codegen_scope`
2021-09-07parse.y: refactor `mrb_parser_parse()`.Yukihiro "Matz" Matsumoto
- remove `mrb_jmpbuf` from `truct mrb_parser_state` - unify exception handling of `mrb_state` and `mrb_parser_state`.
2021-09-06parse.y: refactoring `mrb_parser_parser()`.Yukihiro "Matz" Matsumoto
2021-09-06numeric.c: shortcut overflowing operation when `ndigit` is too small.Yukihiro "Matz" Matsumoto
2021-09-05boxing_word.h: avoid `mrb_float_p()` when `MRB_NO_FLOAT` is on; fix #5546Yukihiro "Matz" Matsumoto
2021-09-05array.c: check integer overflow before addition.Yukihiro "Matz" Matsumoto
2021-09-05codegen.c: avoid integer overflow.Yukihiro "Matz" Matsumoto
2021-09-04kernel.c: add `__method__`; ref #4468Yukihiro "Matz" Matsumoto
2021-09-04Merge branch 'shuujii-rename-Kernel-__method__-to-Kernel-__callee__'Yukihiro "Matz" Matsumoto
2021-09-04Rename `Kernel#__method__` to `Kernel#__callee__`KOBAYASHI Shuji
Because the current behavior of `__method__` is equivalent to `__callee__`. Example: # example.rb def src __send__(ARGV[0]) end alias dst src %w[src dst].each {|n| puts "call #{n} => #{__send__(n).inspect}"} Ruby: $ ruby example.rb __method__ call src => :src call dst => :src $ ruby example.rb __callee__ call src => :src call dst => :dst mruby: $ mruby example.rb __method__ call src => :src call dst => :dst
2021-09-04proc.c: need to preserve `target_class` in `callinfo`.Yukihiro "Matz" Matsumoto
Otherwise `target_class` can be lost when it differs from `proc`'s `target_class`, e.g. when called from `instance_eval`. Also we should not pass `target_class` to `MRB_OBJ_ALLOC` since it checks instance type from the class, and `target_class` may not have proper information. ref #5272
2021-09-04vm.c: remove duplicated calls of `mrb_vm_ci_target_class()`.Yukihiro "Matz" Matsumoto
2021-09-03range.c: `len = b - a` may overflow.Yukihiro "Matz" Matsumoto
2021-09-03range.c: hide internal `__num_to_a' method from backtrace.Yukihiro "Matz" Matsumoto
2021-09-02Merge pull request #5545 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/github/super-linter-4.7.1 build(deps): bump github/super-linter from 4.6.3 to 4.7.1
2021-09-01build(deps): bump github/super-linter from 4.6.3 to 4.7.1dependabot[bot]
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.6.3 to 4.7.1. - [Release notes](https://github.com/github/super-linter/releases) - [Changelog](https://github.com/github/super-linter/blob/master/docs/release-process.md) - [Commits](https://github.com/github/super-linter/compare/v4.6.3...v4.7.1) --- updated-dependencies: - dependency-name: github/super-linter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
2021-09-01Merge pull request #5544 from stuarth/change-languageYukihiro "Matz" Matsumoto
Use gender-neutral pronouns
2021-08-31use gender-neutral pronounsStuart Hinson
2021-09-01Merge pull request #5543 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/github/super-linter-4.6.3 build(deps): bump github/super-linter from 4.6.2 to 4.6.3
2021-09-01string.c: need to adjust index for UTF-8.Yukihiro "Matz" Matsumoto
2021-09-01build_config/ci/gcc-clang.rb: enable `MRB_UTF8_STRING`.Yukihiro "Matz" Matsumoto
2021-09-01string.c: implement `__sub_replace()` in C.Yukihiro "Matz" Matsumoto
To reduce number of string allocation.
2021-09-01mruby.h: obsolete `mrb_to_str()`.Yukihiro "Matz" Matsumoto
Replace them by `mrb_ensure_string_type()`.
2021-09-01string.rb: avoid internal `__to_str` calls.Yukihiro "Matz" Matsumoto
`__to_str` was a mere type check method despite its name.
2021-09-01object.c: remove `mrb_convert_to_integer()' function.Yukihiro "Matz" Matsumoto
And merged to `mrb_f_integer()` which is only usage of the function.
2021-09-01string-ext/string.c: implement `casecmp` in C.Yukihiro "Matz" Matsumoto
* should not raise error for non-string arguments * avoid allocating case converted string internally
2021-09-01string.h: obsolete `mrb_str_to_str()`, even from examples.Yukihiro "Matz" Matsumoto
2021-09-01Do no use return values from `mrb_ensure_` functions.Yukihiro "Matz" Matsumoto
They return the checking argument without modification, so the values are already there. Maybe we should change the return type to `void` but keep them unchanged for compatibility.
2021-09-01mruby.h: reorganize `mrb_ensure/check` functions in headers.Yukihiro "Matz" Matsumoto
2021-08-31build(deps): bump github/super-linter from 4.6.2 to 4.6.3dependabot[bot]
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.6.2 to 4.6.3. - [Release notes](https://github.com/github/super-linter/releases) - [Commits](https://github.com/github/super-linter/compare/v4.6.2...v4.6.3) --- updated-dependencies: - dependency-name: github/super-linter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
2021-08-30Merge pull request #5542 from dearblue/mrb_get_args-cIYukihiro "Matz" Matsumoto
Allow `nil` for `c!` and `I!` specifiers of `mrb_get_args()`
2021-08-29Merge pull request #5541 from dearblue/mrb_get_args-oCSAHYukihiro "Matz" Matsumoto
Integrate the processing of similar specifiers of `mrb_get_args()`
2021-08-28Allow `nil` for `c!` and `I!` specifiers of `mrb_get_args()`dearblue
2021-08-28Integrate the processing of similar specifiers of `mrb_get_args()`dearblue
It is `o`, `C`, `S`, `A` and `H` specifiers that are integrated. As a side effect, the `C!` Specifier can now be used.
2021-08-28Merge pull request #5540 from dearblue/mrb_get_argsYukihiro "Matz" Matsumoto
Refactor the `mrb_get_args()` function
2021-08-27Refactor the `mrb_get_args()` functiondearblue
- Removed the `ARGV` macro. The current path doesn't go into the mruby VM and there's also no need to separate variables. - Use common functions to check object types. - Use `mrb_ensure_string_type()` to check the string instead of `mrb_to_str()`. This is for consistency with array and hash. - Use `mrb_ensure_array_type()` to check the array instead of `to_ary()`. - Use `mrb_ensure_hash_type()` to check the hash instead of `to_hash()`. - Add and use `ensure_class_type()` to check class and module. - Changed the argument index type from `mrb_int` to `int`. Even if it is `int16_t`, it is enough. `mrb_int` is overkill, especially if `MRB_32BIT` and `MRB_INT64` are defined.
2021-08-27Merge pull request #5539 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/github/super-linter-4.6.2 build(deps): bump github/super-linter from 4.6.1 to 4.6.2
2021-08-26build(deps): bump github/super-linter from 4.6.1 to 4.6.2dependabot[bot]
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.6.1 to 4.6.2. - [Release notes](https://github.com/github/super-linter/releases) - [Commits](https://github.com/github/super-linter/compare/v4.6.1...v4.6.2) --- updated-dependencies: - dependency-name: github/super-linter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
2021-08-26etc.c: keep full `float32` with `MRB_64BIT` and `MRB_USE_FLOAT32`.Yukihiro "Matz" Matsumoto
2021-08-26boxing_nan.h: rename prefix `BOXNAN` to `NANBOX`.Yukihiro "Matz" Matsumoto
2021-08-26boxing_word.h: rename prefix `BOXWORD` to `WORDBOX`.Yukihiro "Matz" Matsumoto
2021-08-26boxing_word.h: rename configuration macro name.Yukihiro "Matz" Matsumoto
`MRB_WORDBOX_USE_HEAP_FLOAT` instead of `MRB_USE_FLOAT_FULL_PRECISION`.