Yukihiro "Matz" Matsumoto
800cb15fc3
limitation.md: describe mruby limitation for keyword arguments; #5952
2023-03-17 18:58:04 +09:00
Yukihiro "Matz" Matsumoto
de70014643
mruby-binding/binding.c: add comment for functions from outer gems
2023-03-16 19:02:23 +09:00
Yukihiro "Matz" Matsumoto
62a8ea7113
mruby-bigint/bigint.c: mrb_bint_add_d, mrb_bint_sub_d only take int
...
Where mrb_bint_add and mrb_bint_sub may take float numbers.
2023-03-15 19:09:02 +09:00
Yukihiro "Matz" Matsumoto
3f7ea47ec1
Merge pull request #5917 from jbampton/remove-super-linter-folder
...
Remove `super-linter.report` folder
2023-03-15 19:07:30 +09:00
Yukihiro "Matz" Matsumoto
4fc69ce3bc
Revert "mruby/throw.h: do not use __builtin_setjmp for GCC; close #5950 "
...
This reverts commit 9cf49d08b4 .
This change caused flaky tests on MinGW. I now remember it was introduced
for MINGW64 to address #5133 . Sorry.
2023-03-14 19:50:15 +09:00
Yukihiro "Matz" Matsumoto
0d07af104b
internal.h: move function prototypes to <mruby/internal.h>
2023-03-14 11:06:44 +09:00
Yukihiro "Matz" Matsumoto
2d975d59ce
Merge branch 'dearblue-binding.4'
2023-03-14 11:05:53 +09:00
Yukihiro "Matz" Matsumoto
6915e75207
Merge branch 'binding.4' of https://github.com/dearblue/mruby into dearblue-binding.4
2023-03-14 11:05:10 +09:00
Yukihiro "Matz" Matsumoto
da2cfa62f4
AUTHORS: update entries [ci skip]
2023-03-13 19:01:32 +09:00
Yukihiro "Matz" Matsumoto
0906cd7593
numeric.c: fix rounding function issues with big numbers
...
- int_ceil
- int_floor
- int_round
- int_truncate
2023-03-13 18:53:17 +09:00
Yukihiro "Matz" Matsumoto
8d1192f8a2
gc.c (mrb_field_write_barrier): change the condition
...
Minor GC may be suspended with the MRB_GC_STATE_SWEEP.
2023-03-13 18:52:03 +09:00
Yukihiro "Matz" Matsumoto
ccca6ec458
gc.c (clear_all_old): simplify the code
...
The function is called only with generational mode.
2023-03-13 18:50:51 +09:00
Yukihiro "Matz" Matsumoto
9a1e6760a8
mruby-bigint: add new functions mrb_bint_add_d, mrb_bint_sub_d
...
Those functions do not normalize the return value to avoid repeated
conversions between Bigints and (small) Integers.
2023-03-13 16:07:17 +09:00
Yukihiro "Matz" Matsumoto
f7cbb319cb
mruby-bigint: remove unused mrb_bint_div_ii() function
2023-03-13 08:10:41 +09:00
Yukihiro "Matz" Matsumoto
33320b08bb
mruby-data: fix uninitialized variable error
2023-03-13 08:09:26 +09:00
Yukihiro "Matz" Matsumoto
7327ca898c
mruby-struct: fix uninitialized variable error
2023-03-13 08:08:30 +09:00
Yukihiro "Matz" Matsumoto
dd0a9e8970
mruby-bigint/bigint.c: remove a condition to stop warnings
2023-03-13 08:06:41 +09:00
Yukihiro "Matz" Matsumoto
9cf49d08b4
mruby/throw.h: do not use __builtin_setjmp for GCC; close #5950
...
https://gcc.gnu.org/onlinedocs/gcc/Nonlocal-Gotos.html
2023-03-13 08:05:55 +09:00
Yukihiro "Matz" Matsumoto
924d605712
vm.c: remove redundant assignment (already done in cipush)
2023-03-13 08:05:55 +09:00
Yukihiro "Matz" Matsumoto
0edb616f51
gc.c: remove time profiling code for debugging
2023-03-13 08:05:54 +09:00
Yukihiro "Matz" Matsumoto
a8d840da19
Merge pull request #5928 from dearblue/task/install
...
Improved `rake install`
2023-03-13 08:05:20 +09:00
Yukihiro "Matz" Matsumoto
938ad70e1e
Merge pull request #5938 from dearblue/reorganize-gem-init-final
...
Reorganize gem init final
2023-03-13 07:52:20 +09:00
dearblue
1432baec1d
Perform chores with mrb_final_mrbgems() function
...
The main purpose is to ignore exceptions raised by the GEMS finalizer.
2023-03-12 14:31:10 +09:00
dearblue
c474ae8cc4
Perform chores with mrb_init_mrbgems() function
...
Make the `mrb_init_mrbgems()` function do the cleanup and error handling.
Instead, simplify processing in the `GENERATED_TMP_mrb_XXX_gem_init()` function.
Previously, `mrb_load_irep()` or `mrb_load_proc()` would kill the process when an exception occurred.
With this patch, it is now caught by `mrb_core_init_protect()`.
2023-03-12 10:25:54 +09:00
Yukihiro "Matz" Matsumoto
629d81f57b
Merge pull request #5937 from dearblue/note-gem-init
...
Add the generator path to the `build/***/gem_init.c` file
2023-03-12 08:01:38 +09:00
Yukihiro "Matz" Matsumoto
894ce40797
Merge pull request #5946 from dearblue/const-search
...
Don't switch constant search path from modules to Object
2023-03-11 16:19:53 +09:00
Yukihiro "Matz" Matsumoto
90e53cad39
Merge pull request #5945 from dearblue/env-internal
...
Avoid exposure for `REnv` objects
2023-03-11 16:18:28 +09:00
Yukihiro "Matz" Matsumoto
7f79ca2cf6
mruby-compiler: need to adjust the line number for do_block; fix #5949
2023-03-11 15:49:35 +09:00
Yukihiro "Matz" Matsumoto
927a9df453
mruby-data/data.c: allow empty Data
2023-03-10 08:52:06 +09:00
Yukihiro "Matz" Matsumoto
c212edec5f
mruby-struct/struct.c: allow empty Struct when a name is not given
2023-03-10 08:52:06 +09:00
Yukihiro "Matz" Matsumoto
fc4fe48a00
mruby-time/time.c: fix error message from localtime_r(3) failure
2023-03-10 08:52:06 +09:00
Yukihiro "Matz" Matsumoto
13cd0e5585
mruby-time/time.c (mrb_time_minus): specify mrb_float directly
...
The `typedef mrb_sec` does not improve readability at all.
2023-03-10 08:52:06 +09:00
Yukihiro "Matz" Matsumoto
e62d672ef3
mruby-time/time.c (mrb_to_time_t): support Bigint if defined
2023-03-10 08:52:06 +09:00
Yukihiro "Matz" Matsumoto
01233f70bd
mruby-bigint/bigint.c: add two new functions to convert to 64bit int
...
- mrb_bint_as_int64()
- mrb_bint_as_uint64()
2023-03-10 08:52:05 +09:00
Yukihiro "Matz" Matsumoto
c71408bc0a
mruby-time/time.c (mrb_to_time_t): raise error if obj is not time
...
Or a time-compatible object like a number.
2023-03-10 08:52:05 +09:00
Yukihiro "Matz" Matsumoto
7096d277da
mruby-time/time.c: support bigint to time_t if necessary
2023-03-10 08:52:05 +09:00
Yukihiro "Matz" Matsumoto
da8c23524f
mruby-time/time.c (mrb_to_time_t): use floor instead of llround
...
Since we should generate `t=(sec+usec)` from a floating point number
`sec` should be `floor(f)` especially for negative numbers, if the place
for `usec` is specified. In contrast, we can `round` the below point
digits if we are going to ignore them. But we now use `round` instead of
`llround` which directly convert `double` to `long long`, to add
boundary check for conversion.
2023-03-10 08:52:05 +09:00
Yukihiro "Matz" Matsumoto
2f0265d078
mruby-io/io.c (check_file_descriptor): stop "unused label" warning
2023-03-10 08:52:05 +09:00
Yukihiro "Matz" Matsumoto
9a3199cadd
mruby-io/file.c: atime, ctime, mtime to return Bigint if possible
2023-03-10 08:52:05 +09:00
Yukihiro "Matz" Matsumoto
a3b84fbb08
mruby-bigint/bigint.c: add 2 new functions for 64 bit integer
...
- mrb_bint_new_int64()
- mrb_bint_new_uint64()
2023-03-10 08:52:05 +09:00
Yukihiro "Matz" Matsumoto
b1d0a3d3aa
etc.c (mrb_float_id): define the function only when necessary
2023-03-10 08:52:04 +09:00
Yukihiro "Matz" Matsumoto
e5de08b692
mruby-time/time.c (time_mktime): should allow year before 1900
...
If the platform use 64 bit time_t, it is possible to represent the year
before 1903. So we should remove this check.
2023-03-10 08:52:04 +09:00
Yukihiro "Matz" Matsumoto
bcd595ad1b
mruby-bigint/bigint.c: add else to skip if check
2023-03-10 08:52:04 +09:00
Yukihiro "Matz" Matsumoto
f1ffedc3fa
vm.c: kdict may be converted to a normal argument; fix #5944
2023-03-10 08:52:04 +09:00
Yukihiro "Matz" Matsumoto
18158c96f5
Merge pull request #5948 from dearblue/cinfo
...
Added note to `CINFO_*` constants
2023-03-10 08:50:26 +09:00
Yukihiro "Matz" Matsumoto
840953b55a
Merge pull request #5947 from dearblue/fiber-resume
...
Remove unreachable codes in `Fiber#resume`
2023-03-10 08:49:12 +09:00
dearblue
ddaf3bdc0f
Added note to CINFO_* constants
2023-03-09 22:13:52 +09:00
dearblue
f4c4809750
Remove unreachable codes in Fiber#resume
...
ref. #5782
2023-03-09 21:40:03 +09:00
dearblue
9c9be44a98
Don't switch constant search path from modules to Object
...
Previously, for example, it was possible to retrieve the `String` class as follows:
```console
% bin/mruby -e 'p Comparable::Enumerable::Errno::GC::Kernel::Math::ObjectSpace::String'
String
```
Note that this patch affects the API function `mrb_const_get()`.
2023-03-05 20:32:56 +09:00
dearblue
38d5ed44e1
Avoid exposure for REnv objects
...
The `REnv` object is difficult to deal with, and it would be ideal if the user did not have to manipulate it directly.
In some previous situations, it was necessary to call `mrb_env_unshare()`, a non-API function, after `mrb_load_string()` or similar.
With this patch, it is no longer necessary for users to use `mrb_env_unshare()` directly, as it is now handled internally simply by using the `mrb_vm_ci_env_clear()` function.
Also, `mrb_vm_ci_env_set()` is demoted from the `MRB_API` function for the same reason.
ref. commit 1ab3da6f08
2023-03-05 17:45:47 +09:00