Yuki Kurihara
9d6cb6ecff
Fix doc for limitation
...
`binding` has been supported since 3.1.0.
2022-09-05 12:12:37 +09:00
Yukihiro "Matz" Matsumoto
966d90e182
src/readfloat.c: renamed from readflt.c
2022-09-05 07:30:13 +09:00
Yukihiro "Matz" Matsumoto
4669d43f50
error.h: move rbreak_tag definitions to src/vm.c.
2022-09-05 07:30:12 +09:00
Yukihiro "Matz" Matsumoto
bf16315b70
mruby-exit/exit.c: add fallback definition of constants.
...
- EXIT_SUCCESS
- EXIT_FAILURE
2022-09-05 07:30:12 +09:00
Yukihiro "Matz" Matsumoto
9f47f11abd
math.c: update prototype style.
2022-09-05 07:30:12 +09:00
Yukihiro "Matz" Matsumoto
0cc361990c
Merge pull request #5787 from dearblue/count_objects
...
Improves `ObjectSpace.count_objects`
2022-09-05 07:30:03 +09:00
dearblue
c123c49ac4
Improves ObjectSpace.count_objects
...
- Support for `MRB_TT_STRUCT`, `MRB_TT_BREAK` and `MRB_TT_BIGINT`.
- Performs symbol value embedding with `MRB_SYM()`.
2022-09-04 20:53:18 +09:00
Yukihiro "Matz" Matsumoto
eecb6cc080
vm.c (cipush): push block information in the callinfoa; fix #5786
2022-09-01 18:57:19 +09:00
Yukihiro "Matz" Matsumoto
4f0679bb86
pack.c (pack_unpack): small refactoring.
2022-08-31 23:29:12 +09:00
Yukihiro "Matz" Matsumoto
3643f067c2
proc.h: remove unused env flags.
...
- MRB_ENV_TOUCHED
- MRB_ENV_HEAPED
2022-08-31 07:27:14 +09:00
Yukihiro "Matz" Matsumoto
15e9b09bef
pack.c (hex2int): should return signed integer.
2022-08-30 18:08:05 +09:00
Yukihiro "Matz" Matsumoto
0645c4536b
readflt.c: small style modifications.
2022-08-29 15:14:46 +09:00
Yukihiro "Matz" Matsumoto
dfeda0acc8
random.c: remove Random::DEFAULT.
2022-08-28 08:01:59 +09:00
Yukihiro "Matz" Matsumoto
8c1b2ee0bb
numeric_ext.c (int_powm): avoid integer overflow by modulo first.
...
We do not fall back to big integer calculation unless absolutely necessary.
2022-08-27 22:18:38 +09:00
Yukihiro "Matz" Matsumoto
5b1e14b96b
numeric_ext.c (int_powm): better error message.
2022-08-26 14:27:54 +09:00
Yukihiro "Matz" Matsumoto
f5a3f4f2ea
bigint.c (mpz_powm): avoid stack allocations.
2022-08-26 14:27:54 +09:00
Yukihiro "Matz" Matsumoto
b158581118
bigint.c (udiv): xx%yy should have been xx when xx<yy.
2022-08-26 14:19:10 +09:00
Yukihiro "Matz" Matsumoto
4e0da4f0d8
bigint.c (mpz_init_set): fully initialize mpz_t first.
2022-08-26 14:18:30 +09:00
Yukihiro "Matz" Matsumoto
62c36c03b3
bigint.c (mpz_set_int): fixed a bug in integer size check.
2022-08-26 12:55:29 +09:00
Yukihiro "Matz" Matsumoto
6598732892
numeric_ext.c (int_powm): try bigint pow when overflow.
2022-08-26 12:37:54 +09:00
Yukihiro "Matz" Matsumoto
b4785044d5
bigint.c (mrb_bint_powm): fix a return value bug.
2022-08-26 12:13:24 +09:00
Yukihiro "Matz" Matsumoto
ef1974099d
bigint.c (mrb_bint_powm): check zero division first.
2022-08-26 12:10:22 +09:00
Yukihiro "Matz" Matsumoto
818ca413af
symbol.c (find_symbol): use mrb_byte_hash() instead of symhash().
2022-08-25 18:50:17 +09:00
Yukihiro "Matz" Matsumoto
b832856978
Merge branch 'sasq64-get-args-array'
2022-08-24 16:50:02 +09:00
Yukihiro "Matz" Matsumoto
d4e649f8bf
class.c: refactoring mrb_get_args(); ref #5596
2022-08-24 16:49:10 +09:00
Yukihiro "Matz" Matsumoto
eaa89fbe2a
Merge branch 'get-args-array' of https://github.com/sasq64/mruby into sasq64-get-args-array
2022-08-24 16:46:00 +09:00
Yukihiro "Matz" Matsumoto
7c0f7e2665
parse.y: allow NUMPARAMs (e.g. _1) as hash keys; fix #5785
2022-08-23 18:36:26 +09:00
Yukihiro "Matz" Matsumoto
f587edd849
pack.c: need extra space for the terminal NULL.
2022-08-23 15:05:27 +09:00
Yukihiro "Matz" Matsumoto
a641f146fc
codegen.c (gen_assignment): use nsym() instead of simple type cast.
2022-08-23 11:30:54 +09:00
Yukihiro "Matz" Matsumoto
108875c972
codegen.c (gen_assignment): support NODE_COLON3 as lhs; fix #5752
...
We should allow `::C = 1` for example.
2022-08-23 07:53:23 +09:00
Yukihiro "Matz" Matsumoto
c6daaa8c07
struct.c (make_struct): use preallocated symbols.
2022-08-22 16:12:59 +09:00
Yukihiro "Matz" Matsumoto
35a5678899
mruby-pack/pack.c: make base64_dec_tab a static array of chars.
2022-08-21 19:25:16 +09:00
Yukihiro "Matz" Matsumoto
9b4bbed047
vm.c (OP_SEND): remove scoping braces; ref #5775
2022-08-20 21:24:30 +09:00
Yukihiro "Matz" Matsumoto
43c5cd2dea
Merge pull request #5775 from dearblue/integrate-super
...
Integrate the second half of `OP_SUPER` with `OP_SENDB`
2022-08-20 21:23:16 +09:00
Yukihiro "Matz" Matsumoto
c7d2eaa3e8
Revert "vm.c (mrb_funcall_with_block): avoid use of MRB_METHOD_CFUNC_P()."
...
This reverts commit c28ac75a87 .
This change caused SEGV in the case like the following:
```
class C
class << self
attr_accessor :a
alias :const_missing :a=
end
end
p C::CONST
```
2022-08-20 12:58:17 +09:00
Yukihiro "Matz" Matsumoto
563010697e
doc/guides/compile.md: add rake clean tip; ref #5784 [ci skip]
2022-08-20 12:54:30 +09:00
dearblue
9c3e0145eb
Directly write ARGUMENT_NORMALIZE()
...
The common parts of `OP_SEND` and `OP_SUPER` have been merged so they no longer need to be independent.
This effectively means revert commit d0e8637e30 .
2022-08-20 10:46:46 +09:00
dearblue
a7bfddecdb
Integrate the second half of OP_SUPER with OP_SENDB
...
Not exactly the same, but I think there were some things that should have been fixed in the original `OP_SUPER`.
2022-08-20 10:46:46 +09:00
Yukihiro "Matz" Matsumoto
28d1e794db
vm.c (mrb_funcall_with_block): need to initialize arginfo.
2022-08-19 23:17:23 +09:00
Yukihiro "Matz" Matsumoto
82b98bb8a4
vm.c (funcall_args_capture): move argument set-up in the function; #5777
2022-08-18 13:00:08 +09:00
Yukihiro "Matz" Matsumoto
c28ac75a87
vm.c (mrb_funcall_with_block): avoid use of MRB_METHOD_CFUNC_P().
2022-08-18 12:58:30 +09:00
Yukihiro "Matz" Matsumoto
772fe11d83
vm.c (stack_copy): use early return.
2022-08-18 12:57:51 +09:00
Yukihiro "Matz" Matsumoto
d577221c2d
vm.c (stack_copy) check if src is NULL before memcpy(); ref #5777
...
Because 2nd argument of memcpy() is declared to never be null.
2022-08-18 08:17:44 +09:00
Yukihiro "Matz" Matsumoto
8c08324d2f
Merge pull request #5777 from dearblue/gc-on-cipush
...
Protect prepared arguments when GC occurs in `cipush()`
2022-08-18 08:09:05 +09:00
Yukihiro "Matz" Matsumoto
490d805577
Merge pull request #5783 from jbampton/patch-1
...
Use Super-Linter Slim Image
2022-08-17 12:58:54 +09:00
John Bampton
890d48463a
Use Super-Linter Slim Image
...
Should improve workflow time.
https://github.com/github/super-linter#slim-image
2022-08-17 08:53:06 +10:00
Yukihiro "Matz" Matsumoto
993c388cce
bigint.c (mrb_bint_idiv): remove unused function.
2022-08-16 15:45:54 +09:00
Yukihiro "Matz" Matsumoto
4107cc95a2
internal.c: move some functions to <mruby/internal.h>.
...
Ref #5776
2022-08-15 18:13:59 +09:00
Yukihiro "Matz" Matsumoto
37dc1be74b
internal.c: move mrb_method_missing prototype to <mruby/internal.h>.
...
Ref #5776
2022-08-15 17:25:08 +09:00
Yukihiro "Matz" Matsumoto
db20cbce53
src/class.c: move method_missing from Kernel to BasicObject; fix #5776
...
In ISO30170, method_missing is defined under Kernel, but BasicObject is
introduced after ISO and we should move (and have moved) some Kernel
methods to BasicObject, e.g. instance_eval, equal?, etc.
We have missed method_missing (mostly because built-in method_missing
in VM handles most of the case).
2022-08-15 16:41:19 +09:00