dearblue
177debacc5
Always run atexit on the top-level call frame
...
In the following example, the fiber context and call stack may be in an incomplete state.
- In case another thread running mruby is terminated abnormally
- In case of a global jump that is out of management by mruby
2024-05-26 21:17:00 +09:00
Yukihiro "Matz" Matsumoto
20cf58d1d3
Merge pull request #6273 from dearblue/closing
...
Improvements to `mrb_protect_atexit()`
2024-05-25 16:48:56 +09:00
Yukihiro "Matz" Matsumoto
d415a45a33
AUTHORS: update entries [ci skip]
2024-05-25 16:47:08 +09:00
Yukihiro "Matz" Matsumoto
10bc15c23e
mruby-class-ext: adjust variable declarations
2024-05-25 16:41:24 +09:00
Yukihiro "Matz" Matsumoto
292f7ef0ce
mruby-proc-ext (mrb_proc_parameters): adjust variable declarations
2024-05-25 16:39:32 +09:00
Yukihiro "Matz" Matsumoto
89c70aeea0
mruby-range-ext: move local variable declarations to minimize scope
2024-05-25 16:39:32 +09:00
Yukihiro "Matz" Matsumoto
7c2be58e2a
mruby-rational (rational_pow): fix wrong power calculation
...
`a/b ** -n` can be calculated by `b/a ** n` for correctness.
2024-05-25 16:39:32 +09:00
Yukihiro "Matz" Matsumoto
d148bf8c0b
mruby-rational: adjust local variable declarations with initialization
2024-05-25 16:39:32 +09:00
Yukihiro "Matz" Matsumoto
68e093729b
string.c: refactor bit operation (e.g. SWAR)
...
To generate a bit mask of `0x8080...` of the word size, we prepare
`MASK01` which is `0x0101...` and multiply masking word (e.g., `0x80).
2024-05-25 16:39:32 +09:00
Yukihiro "Matz" Matsumoto
bff68cbf17
mruby-socket (inet_ntop): refactor addrinfo loop
2024-05-25 16:39:31 +09:00
Yukihiro "Matz" Matsumoto
4e824048c0
mruby-socket: adjust local variable declarations
2024-05-25 16:39:31 +09:00
Yukihiro "Matz" Matsumoto
bd7efbe75f
string.c: check if the index points character boundary; fix #6267
2024-05-25 16:39:31 +09:00
dearblue
b12ea17d0b
Improvements to mrb_protect_atexit()
...
- Initialize the GC arena each time `atexit` is called.
- To reduce the overhead of `MRB_TRY()`, an internal loop is also performed.
2024-05-25 10:48:16 +09:00
Yukihiro "Matz" Matsumoto
f2e1cf2d3c
Merge pull request #6272 from mruby/dependabot/github_actions/super-linter/super-linter-6.5.1
...
build(deps): bump super-linter/super-linter from 6.5.0 to 6.5.1
2024-05-25 07:57:55 +09:00
dependabot[bot]
ccc34c37b9
build(deps): bump super-linter/super-linter from 6.5.0 to 6.5.1
...
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter ) from 6.5.0 to 6.5.1.
- [Release notes](https://github.com/super-linter/super-linter/releases )
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/super-linter/super-linter/compare/v6.5.0...v6.5.1 )
---
updated-dependencies:
- dependency-name: super-linter/super-linter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-24 14:22:15 +00:00
Yukihiro "Matz" Matsumoto
86f620822f
Merge pull request #6269 from mruby/dependabot/github_actions/super-linter/super-linter-6.5.0
...
build(deps): bump super-linter/super-linter from 6.4.1 to 6.5.0
2024-05-16 07:09:41 +09:00
Yukihiro "Matz" Matsumoto
c635456f16
mruby-dir: fix indentation
2024-05-16 07:06:59 +09:00
dependabot[bot]
e36f0fd266
build(deps): bump super-linter/super-linter from 6.4.1 to 6.5.0
...
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter ) from 6.4.1 to 6.5.0.
- [Release notes](https://github.com/super-linter/super-linter/releases )
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/super-linter/super-linter/compare/v6.4.1...v6.5.0 )
---
updated-dependencies:
- dependency-name: super-linter/super-linter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-15 14:28:17 +00:00
Yukihiro "Matz" Matsumoto
156c7ecae3
Merge pull request #6266 from dearblue/array-delete
...
Passes the nonexistent key as a block argument in `Array#delete`
2024-05-14 09:49:36 +09:00
Yukihiro "Matz" Matsumoto
7865593823
mruby-dir: enumerating methods should return enumerators; #6265
2024-05-14 09:42:38 +09:00
Yukihiro "Matz" Matsumoto
dd552cee13
Merge pull request #6265 from dearblue/dir-children
...
Fixes `Dir.children` and `Dir.each_child`
2024-05-14 09:32:51 +09:00
Yukihiro "Matz" Matsumoto
169114666a
mruby-io: fix Win32 declaration bugs
2024-05-14 01:34:43 +09:00
Yukihiro "Matz" Matsumoto
a147b2c149
Merge pull request #6264 from dearblue/to_enum
...
Must pass keyword arguments for `Kernel#to_enum`
2024-05-14 01:28:14 +09:00
Yukihiro "Matz" Matsumoto
37e7c071c2
mruby-io: adjust local variable declarations
2024-05-14 01:22:04 +09:00
Yukihiro "Matz" Matsumoto
ae6e5b7b5e
mruby-method: adjust local variable declaration place
2024-05-13 23:37:21 +09:00
Yukihiro "Matz" Matsumoto
7dee66c5db
mruby-fiber: adjust local variable declaration places
2024-05-12 20:34:25 +09:00
dearblue
f0cd35c78b
Passes the nonexistent key as a block argument in Array#delete
...
```ruby
a = %w(R G B A)
p a.delete("Y") { _1 }
# BEFORE => nil (same for mruby 3.3)
# AFTER => "Y" (same for CRuby)
```
2024-05-10 22:46:11 +09:00
dearblue
c753ca33d0
Add test for Array#delete
2024-05-10 22:35:13 +09:00
dearblue
12030b3f41
Fixes Dir.children and Dir.each_child
...
The two methods exclude "." and "..".
2024-05-10 21:54:59 +09:00
dearblue
a06e2484e6
Must pass keyword arguments for Kernel#to_enum
2024-05-10 21:50:51 +09:00
Yukihiro "Matz" Matsumoto
dcee404ebb
mruby-hash-ext: use NONE.equal?() for NONE comparison; ref #6262
2024-05-10 20:40:11 +09:00
Yukihiro "Matz" Matsumoto
4d7ad4863f
mruby-enumerator: use NONE.equal?() for NONE comparison; ref #6262
2024-05-10 20:40:11 +09:00
Yukihiro "Matz" Matsumoto
1f80b875c4
mruby-enum-ext: use NONE.equal?() for NONE comparison; ref #6262
2024-05-10 20:40:11 +09:00
Yukihiro "Matz" Matsumoto
db30b0636f
mruby-array-ext: use NONE.equal?() for NONE comparison; fix #6262
...
The equal (`==`) method of the comparison target might be redefined
(the root cause of #6262 ), and not supposed to be compared with NONE.
To reduce chance for the problem, we use `NONE.equal?()` for comparison.
2024-05-10 20:37:01 +09:00
Yukihiro "Matz" Matsumoto
058a4ab5c6
Merge pull request #6263 from leviongit:array/delete
...
fix: `Array#delete` mistakingly calling block even if not passed
2024-05-10 12:11:53 +09:00
leviongit
67df0aca67
fix: Array#delete mistakingly calling block even if not passed
2024-05-09 14:33:23 +02:00
Yukihiro "Matz" Matsumoto
19d9f48f7d
mruby-sleep: update MIT license URL
2024-05-09 17:08:27 +09:00
Yukihiro "Matz" Matsumoto
aac9e4cf0d
Merge pull request #6261 from leviongit/range/to_a
...
fix: `to_a` integer ranges with `begin > end` failing
2024-05-09 17:07:51 +09:00
leviongit
fff07ca182
fix: to_a integer ranges with begin > end failing
...
example of failure:
```rb
(-1..-4).to_a
```
expected result:
```rb
(-1..-4).to_a
```
2024-05-08 23:10:28 +02:00
Yukihiro "Matz" Matsumoto
06480f7147
mruby-string-ext: move local variable declarations
2024-05-08 11:29:20 +09:00
Yukihiro "Matz" Matsumoto
cf785a6133
mruby-random: move variable declarations to initialization
2024-05-07 17:57:41 +09:00
Yukihiro "Matz" Matsumoto
f975794f19
Merge pull request #6260 from dearblue/mrb_vm_exec-exception
...
Remove `exc_caught` from `mrb_vm_exec()`
2024-05-06 22:55:07 +09:00
dearblue
dea5c9e1dc
Remove exc_caught from mrb_vm_exec()
...
Only go to exception handling if `mrb->exc` is non-null.
This may cause some compatibility problems, but I doubt that it is necessary to maintain that compatibility.
Here is how I see the incompatibility with the change at this time:
- If `mrb->exc` is non-null and `mrb_vm_exec()` is called, an exception will be thrown immediately.
- If `MRB_THROW()` is used while `mrb->exc` is `NULL`, it will not go to exception handling.
2024-05-05 21:30:18 +09:00
Yukihiro "Matz" Matsumoto
1e61a875ed
mruby-data: adjust local variable declarations
2024-05-05 18:56:20 +09:00
Yukihiro "Matz" Matsumoto
0a61a9a76f
mruby-struct: adjust local variable declarations
2024-05-05 18:55:42 +09:00
Yukihiro "Matz" Matsumoto
c548943a2b
mruby-symbol-ext: adjust local variable declarations
2024-05-04 08:30:53 +09:00
Yukihiro "Matz" Matsumoto
86b1c8ff87
string.c (utf8_strlen): add assertion utf8_len <= byte_len
2024-05-03 07:50:40 +09:00
Yukihiro "Matz" Matsumoto
aea3e7aedd
mruby-sprintf: raise ArgumentError for % at the bottom
2024-05-03 07:46:45 +09:00
Yukihiro "Matz" Matsumoto
4801a424a3
mruby-time: adjust local variable declarations
2024-05-02 19:55:29 +09:00
Yukihiro "Matz" Matsumoto
c5314a29b7
mruby-test: move declarations in driver.c and vformat.c
2024-05-01 13:24:32 +09:00