星湖新
ab21813100
Move Enumerable#chunk to mruby-enumerator
2024-01-22 18:31:28 +09:00
星湖新
d001974439
Revert "Enumerable#chunk implementation"
...
This reverts commit ebf86a24b0 .
2024-01-22 18:26:01 +09:00
Yukihiro "Matz" Matsumoto
5431575d11
Merge pull request #6148 from buty4649/add-enumerable-grep_v
...
Add Enumerable#grep_v to mruby-enum-ext
2024-01-21 18:51:11 +09:00
dearblue
c112e83b5d
Removed mrb_jmpbuf_id for C++ exceptions
...
Use stack variable addresses as identifiers instead of global variable values.
Since the stack variable address is uniquely determined within the call, there is no need to maintain a global variable.
2024-01-21 13:14:41 +09:00
dearblue
bf2db1ed2b
Check mrb_bigint_p() before mrb_integer()
2024-01-21 10:59:06 +09:00
Yukihiro "Matz" Matsumoto
028c53d667
Merge pull request #6149 from dearblue/rational.new
...
Remove unnecessary `Rational._new` method
2024-01-20 23:28:38 +09:00
Yukihiro "Matz" Matsumoto
888dd230dd
Merge pull request #6147 from dearblue/memsearch
...
Fixed buffer overflow in `mrb_memsearch()`
2024-01-20 23:25:34 +09:00
Yukihiro "Matz" Matsumoto
12483c8393
Merge pull request #6146 from mruby/dependabot/github_actions/actions/cache-4
...
build(deps): bump actions/cache from 3 to 4
2024-01-20 23:24:40 +09:00
dearblue
464ac4581e
Make MRuby::Gems::List#{each,<<} method return self
...
Returning internal objects is undesirable.
2024-01-20 22:49:31 +09:00
dearblue
5caf8e14cf
Retrieving the IO exception class with presym
2024-01-20 22:33:43 +09:00
dearblue
82312467d0
Refer to mrb->module_class directly in mrb_mruby_eval_gem_init()
2024-01-20 22:20:20 +09:00
dearblue
3111990089
Introduce mrb_obj_itself()
...
Some method definitions were changed to use this function.
2024-01-20 22:07:29 +09:00
dearblue
35375257f6
Remove unnecessary Rational._new method
2024-01-20 21:52:49 +09:00
buty4649
97203729a9
Add Enumerable#grep_v to mruby-enum-ext
2024-01-20 11:47:37 +09:00
dearblue
772f13520c
Fixed buffer overflow in mrb_memsearch()
2024-01-20 09:44:47 +09:00
Yukihiro "Matz" Matsumoto
f13101124c
string.c: add cast to remove warnings
2024-01-19 18:24:34 +09:00
Yukihiro "Matz" Matsumoto
69cf074778
string.c (mrb_memsearch): move simple search from mrb_memsearch_qs()
2024-01-19 15:21:43 +09:00
dependabot[bot]
1e9d69f896
build(deps): bump actions/cache from 3 to 4
...
Bumps [actions/cache](https://github.com/actions/cache ) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](https://github.com/actions/cache/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-18 14:59:43 +00:00
Yukihiro "Matz" Matsumoto
6f0c34e04e
mruby-string-ext: implement String#ascii_only? method
2024-01-18 22:53:46 +09:00
Yukihiro "Matz" Matsumoto
57fd0edaa7
mruby.h: rename ASCII flag to SINGLE_BYTE
...
This flag means all the characters in the string can be represented by a
single byte, i.e., the string does not contain any multi-byte character.
Those characters are likely ASCII characters, but may be a part of broken
UTF-8 sequence, so the term 'ASCII' is not sufficient.
2024-01-18 22:50:39 +09:00
Yukihiro "Matz" Matsumoto
5b76d2cbbe
string.h: RSTR_ASCII_P(s) should always be true for non-UTF8 mode
2024-01-16 17:38:51 +09:00
Yukihiro "Matz" Matsumoto
6c2ed55077
mruby-bin-mruby: remove unused assignments
2024-01-16 12:28:32 +09:00
Yukihiro "Matz" Matsumoto
0e079fe946
mruby-bin-mruby: reduce the scope of a loop variable i
2024-01-15 23:04:18 +09:00
Yukihiro "Matz" Matsumoto
9298dfb927
mruby-bin-mruby: reduce the scope of a local variable c
2024-01-15 23:03:34 +09:00
Yukihiro "Matz" Matsumoto
90fac46751
mruby-bin-mruby: remove unnecessary condition
2024-01-15 23:00:46 +09:00
Yukihiro "Matz" Matsumoto
4f8fd23f7a
mruby-string-ext (str_uminus): remove wrong document
...
In mruby, deduplication of strings is not implemented (yet), so we have
to remove the description from `String#-@` document.
2024-01-13 23:00:13 +09:00
Yukihiro "Matz" Matsumoto
c53d9a33fc
mruby-string-ext (mrb_valid_enc_p): simplify the code
...
By using `mrb_utf8len` directly. If `len == 1` and `ch >= 0x80`, the
character should be an invalid character.
2024-01-13 22:48:16 +09:00
星湖新
ebf86a24b0
Enumerable#chunk implementation
2024-01-13 17:36:02 +09:00
Yukihiro "Matz" Matsumoto
fb8bc1954b
string.c: improve performance of chars2bytes/bytes2chars; ref #6143
2024-01-11 18:23:50 +09:00
Yukihiro "Matz" Matsumoto
f646228dbe
string.c (str_index_str_by_char): simplify using str_index_str()
...
Instead of its own version of quick search, now we use str_index_str()
and adjust character position. This change makes searching 4 times
faster in some cases; ref #6143
2024-01-11 12:23:06 +09:00
Yukihiro "Matz" Matsumoto
e42f3b36f9
string.c (chars2bytes): simplify the condition to detect break
2024-01-11 11:49:49 +09:00
John Bampton
f8f3ff10fa
pre-commit: add hook detect-aws-credentials
...
https://github.com/pre-commit/pre-commit-hooks#detect-aws-credentials
Another check or test we can have.
"--allow-missing-credentials - Allow hook to pass when no credentials are detected."
2024-01-11 03:18:15 +10:00
dearblue
514c926e97
Update the mruby3.3.md file
...
- Remove items changed by mruby 3.2.
- The commit hash or pull request number will be written along with the changes.
- Add some items.
2024-01-10 23:00:10 +09:00
Yukihiro "Matz" Matsumoto
787439455c
string.c: remove the macro BYTES_ALIGN_CHECK which is no longer used
2024-01-10 17:31:04 +09:00
Yukihiro "Matz" Matsumoto
c2f148e15d
string.c (mrb_memsearch_qs): reduce the scope of local variables
2024-01-10 16:21:39 +09:00
Yukihiro "Matz" Matsumoto
31f2d93657
string.c (bytes2chars): skip calling mrb_utf8len() if possible
...
If (ch < 0x80) the length of the character (in bytes) should be 1, so we
don't have to call mrb_utf8len().
2024-01-10 15:36:07 +09:00
Yukihiro "Matz" Matsumoto
4c859e754d
string.c (bytes2chars): skip scanning if the string is ASCII only
2024-01-10 14:40:39 +09:00
Yukihiro "Matz" Matsumoto
df0a5e838d
string.c (chars2bytes): use early return
2024-01-10 12:41:28 +09:00
Yukihiro "Matz" Matsumoto
e39e4ea26d
string.c (chars2bytes): small refactoring
2024-01-10 11:09:47 +09:00
Yukihiro "Matz" Matsumoto
1d243bc58b
string.c (bytes2chars): takes a string object instead of char*
2024-01-10 10:53:26 +09:00
Yukihiro "Matz" Matsumoto
59a1d74937
string.c: inline str_range_to_bytes
2024-01-09 18:22:38 +09:00
Yukihiro "Matz" Matsumoto
9135f0991b
string.c: avoid RSTRING_CHAR_LEN() if possible
...
Current code scan the string twice (once from RSTRING_CHAR_LEN, and once
from chars2bytes), but those scans are not necessary. Just point the end
of the string.
2024-01-09 11:44:12 +09:00
Yukihiro "Matz" Matsumoto
f3ebef1172
mruby-string (chars2bytes): reduce the scope of local variables
2024-01-09 11:00:44 +09:00
Yukihiro "Matz" Matsumoto
f1d01a6107
string.c (mrb_utf8len): should return 1 for invalid chars; ref #6143
2024-01-09 10:39:03 +09:00
Yukihiro "Matz" Matsumoto
64a4bf0e28
string.c: avoid infinite loop; fix #6143
...
`mrb_utf8len` returns 0 for invalid characters.
2024-01-09 10:37:52 +09:00
Yukihiro "Matz" Matsumoto
a5e83075d4
string.c: reduce the scope of a local variable
2024-01-09 08:22:26 +09:00
Yukihiro "Matz" Matsumoto
af3482d562
mruby-math: use erfc(x) instead of 1.0 - erf(x)
2024-01-09 08:01:28 +09:00
Yukihiro "Matz" Matsumoto
51c4c4716a
mruby-math: use log1p(x) instead of log(1.0+x)
2024-01-09 07:59:42 +09:00
Yukihiro "Matz" Matsumoto
8a2e88390b
mruby-math: reduce the scope of a local variable
2024-01-09 07:47:57 +09:00
Yukihiro "Matz" Matsumoto
c1fc3219db
mruby-math: fix spacing
2024-01-08 23:18:57 +09:00