Yukihiro "Matz" Matsumoto
4e45e320b0
Fixed a bug in recursive mrb_top_run calls; fix #4384
2019-04-16 18:47:46 +09:00
Yukihiro "Matz" Matsumoto
3760f58d53
Merge pull request #4383 from Shokuji/fix_mruby-io_test
...
Fix test in mruby-io
2019-04-16 17:34:50 +09:00
Shokuji
cdfeb53887
Merge branch 'master' into fix_mruby-io_test
2019-04-16 09:47:32 +09:00
Yukihiro "Matz" Matsumoto
4e3e4260c3
Merge pull request #4381 from shuujii/fix-missing-assertions-in-mruby-random-test
...
Fix missing assertions in `mruby-random` test
2019-04-16 08:39:08 +09:00
KOBAYASHI Shuji
d53eb8a377
Fix missing assertions in mruby-random test
2019-04-15 19:03:39 +09:00
Shouji Kuboyama
164985881b
Fix test, popen and cmd in mruby-io
2019-04-15 17:16:08 +09:00
Yukihiro "Matz" Matsumoto
6b8d3c7070
Fixed wrong function names; fix #4380
2019-04-15 07:15:38 +09:00
Yukihiro "Matz" Matsumoto
7a62efae63
Merge pull request #4379 from shuujii/extract-similar-codes-to-macros-for-math-opcode-in-mrb_vm_exec
...
Extract similar codes to macros for math opcode in `mrb_vm_exec()`
2019-04-15 07:08:27 +09:00
KOBAYASHI Shuji
30c880bea9
Extract similar codes to macros for math opcode in mrb_vm_exec
2019-04-14 22:40:17 +09:00
Yukihiro "Matz" Matsumoto
ea6aab20e8
Merge pull request #4378 from dearblue/memleak-hashtable
...
Fix memory leak for hash table index if occur out of memory
2019-04-14 20:36:29 +09:00
Yukihiro "Matz" Matsumoto
6ad89d30d2
Merge pull request #4377 from dearblue/wrong-iv-size
...
Fix wrong size of instance variable if occur out of memory
2019-04-14 20:36:05 +09:00
Yukihiro "Matz" Matsumoto
e74a8a7360
Merge pull request #4376 from dearblue/leak-symbols
...
Fix leaked function symbols
2019-04-14 20:35:19 +09:00
Yukihiro "Matz" Matsumoto
4a1d29cbb8
Merge pull request #4375 from dearblue/forgotten-structs
...
Include `RFiber` and `RIstruct` as a part of `RVALUE`
2019-04-14 20:34:45 +09:00
Yukihiro "Matz" Matsumoto
ec41262e22
Merge pull request #4374 from dearblue/hexdump
...
Fix hexdigits convertion
2019-04-14 20:34:14 +09:00
dearblue
d328808892
Fix memory leak for hash table index if occur out of memory
2019-04-14 17:55:20 +09:00
dearblue
d8527d17ea
Fix wrong size of instance variable if occur out of memory
2019-04-14 17:42:35 +09:00
dearblue
d557f97732
Remove pointer check after mrb_malloc()
2019-04-14 17:39:50 +09:00
dearblue
3f3e4754d9
Fix leaked function symbols
...
- `free_heap()` in src/gc.c
- `symhash()` in src/symbol.c
- `no_optimize()` in mrbgems/mruby-compiler/core/codegen.c
2019-04-14 17:23:16 +09:00
dearblue
dac0f3f5e8
Fix string index for appending
...
`sizeof(string-literal)` is included `'\0'` character
2019-04-14 16:16:05 +09:00
dearblue
c2fa935fee
Fix hexdigits convertion
2019-04-14 16:11:21 +09:00
dearblue
0ebbc491a1
Include RFiber and RIstruct as a part of RVALUE
2019-04-14 15:35:51 +09:00
Yukihiro "Matz" Matsumoto
4d8ff2fba4
Merge pull request #4373 from shuujii/fix-broken-NaN-with-MRB_NAN_BOXING
...
Fix broken NaN with `MRB_NAN_BOXING`
2019-04-14 12:25:54 +09:00
KOBAYASHI Shuji
f639da0f1c
Fix broken NaN with MRB_NAN_BOXING
...
Example:
$ bin/mruby -e '(Float::INFINITY - Float::INFINITY).nan?'
zsh: segmentation fault
Cause:
`SET_FLOAT_VALUE` is not used. It is needed for normalizing NaN.
Treatment:
In my environment, this issue could be reproduced only when
`infinity - infinity`, however `SET_FLOAT_VALUE` should be used in all
arithmetic operations (regardless of boxing setting), I think.
So I fixed all similar codes by extracting to macro.
2019-04-13 19:27:17 +09:00
Yukihiro "Matz" Matsumoto
79fd986bcb
Small refactoring in mrb_funcall_with_block.
2019-04-12 23:04:10 +09:00
Yukihiro "Matz" Matsumoto
7f1984a01e
Merge pull request #4372 from shuujii/refine-assert_float
...
Refine `assert_float`
2019-04-12 22:58:57 +09:00
Yukihiro "Matz" Matsumoto
befdf59e61
Deallocate s->lines in codegen_error; ref #4370
2019-04-12 22:54:25 +09:00
Yukihiro "Matz" Matsumoto
00545fc51d
The number of local variables should be less than 1024; fix #4370
...
The `env` stores stack length in a 10 bit field.
See `MRB_ENV_STACK_LEN()` macro.
2019-04-12 22:52:26 +09:00
KOBAYASHI Shuji
6626fbc500
Refine assert_float
...
Avoid arithmetic operations when `exp` and/or `act` are infinity or NaN.
2019-04-12 22:27:07 +09:00
Yukihiro "Matz" Matsumoto
6da10f643a
Merge pull request #4369 from shuujii/remove-incorrect-flags-updating-in-mrb_regexp_p
...
Remove incorrect flags updating in `mrb_regexp_p()`
2019-04-12 21:01:49 +09:00
Yukihiro "Matz" Matsumoto
9b9c41d699
Merge pull request #4371 from clayton-shopify/fix-buffer-overflows
...
Fix buffer overflows in parser.
2019-04-12 19:56:35 +09:00
Clayton Smith
57e617620a
Fix buffer overflows in parser.
2019-04-11 20:07:43 -04:00
KOBAYASHI Shuji
0c9c3f08ee
Remove incorrect flags updating in mrb_regexp_p()
2019-04-11 21:42:18 +09:00
Yukihiro "Matz" Matsumoto
9c252410cf
Merge pull request #4368 from shuujii/use-mrb_immediate_p-in-mrb_obj_freeze-and-mrb_obj_frozen
...
Use `mrb_immediate_p()` in `mrb_obj_freeze()` and `mrb_obj_frozen()`
2019-04-10 19:34:58 +09:00
KOBAYASHI Shuji
7b0ebed033
Use mrb_immediate_p() in mrb_obj_freeze() and mrb_obj_frozen()
2019-04-10 19:19:53 +09:00
Yukihiro "Matz" Matsumoto
4776ac50ed
Remove too aggressive initialize call in mrb_instance_new.
2019-04-10 19:11:35 +09:00
Yukihiro "Matz" Matsumoto
88ac7549c0
Remove MRB_API from mrb_instance_new.
2019-04-10 19:11:35 +09:00
Yukihiro "Matz" Matsumoto
d0b30f4ce2
Merge pull request #4367 from shuujii/extract-frozen-checking-to-function
...
Extract frozen checking to function
2019-04-10 06:03:32 +09:00
Yukihiro "Matz" Matsumoto
b433001a1b
Merge pull request #4366 from shuujii/remove-unneeded-function-prototypes
...
Remove unneeded function prototypes
2019-04-10 06:02:16 +09:00
Yukihiro "Matz" Matsumoto
b351bdb8d5
Fixed old style declaration; ref #4365
2019-04-10 06:00:38 +09:00
Yukihiro "Matz" Matsumoto
d529501cbf
Rename itoa to dump_int to avoid name crash; ref #4173
2019-04-10 05:55:40 +09:00
Yukihiro "Matz" Matsumoto
16f86f8ede
Use the old style declaration; ref #4365
2019-04-10 05:42:36 +09:00
KOBAYASHI Shuji
e3beef065c
Extract frozen checking to function
2019-04-09 18:23:11 +09:00
KOBAYASHI Shuji
f89fe04d54
Remove unneeded function prototypes
2019-04-08 22:34:49 +09:00
Yukihiro "Matz" Matsumoto
292bffb32e
Avoid infinite loop when no Regexp class is available; fix #4363
2019-04-08 20:27:28 +09:00
Yukihiro "Matz" Matsumoto
ec1688807e
Avoid using snprintf when MRB_DISABLE_STDIO is set; fix #4173
2019-04-08 19:06:36 +09:00
Yukihiro "Matz" Matsumoto
6cec0c9f62
Fix C99 style inline declaration; fix #4365
2019-04-08 19:06:36 +09:00
Yukihiro "Matz" Matsumoto
2595d5f6c8
Merge pull request #4364 from shuujii/fix-test-for-Array-slice
...
Fix test for `Array#slice`
2019-04-07 22:12:33 +09:00
KOBAYASHI Shuji
f65b35dc9f
Fix test for Array#slice
2019-04-07 21:31:12 +09:00
Yukihiro "Matz" Matsumoto
6865826aff
Merge pull request #4362 from shuujii/move-Array-append-prepend-from-core-to-mruby-ary-ext
...
Move `Array#(append|prepend)` from core to `mruby-ary-ext`
2019-04-06 22:25:55 +09:00
Yukihiro "Matz" Matsumoto
64c2ea3f02
Merge pull request #4361 from shuujii/remove-unused-mrb_proc_cfunc_p
...
Remove unused `mrb_proc_cfunc_p()`
2019-04-06 22:22:38 +09:00