Commit Graph

18498 Commits

Author SHA1 Message Date
mimaki 9d523e2f74 Update version to 4.0.0RC2. 4.0.0-rc2 2026-03-12 19:07:19 +09:00
mimaki 380c459d37 Merge branch 'master' into stable 2026-03-12 19:01:29 +09:00
Yukihiro "Matz" Matsumoto eb7d0b86d7 Merge pull request #6736 from jbampton/add-dependabot-pre-commit 2026-03-12 17:16:48 +09:00
John Bampton 9bdf998faa Add pre-commit ecosystem to Dependabot
Group dependabot updates to reduce repo noise

Add descriptive group labels

https://github.blog/changelog/2026-03-10-dependabot-now-supports-pre-commit-hooks/

https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference#package-ecosystem-
2026-03-12 16:59:11 +10:00
Yukihiro "Matz" Matsumoto 457a50b485 Merge pull request #6744 from mruby/fix/case-in-no-match-error 2026-03-12 14:36:46 +09:00
Yukihiro "Matz" Matsumoto 143959b94b doc: fix prettier formatting in markdown files
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 14:33:37 +09:00
Yukihiro "Matz" Matsumoto d8de35b635 codegen.c: raise NoMatchingPatternError in case/in without else
case/in without else clause now raises NoMatchingPatternError
when no pattern matches, matching CRuby behavior. Fixes #6741.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 14:28:17 +09:00
Yukihiro "Matz" Matsumoto b34b7206f9 Merge pull request #6738 from jbampton/add-manual-hooks-workflow 2026-03-12 14:20:02 +09:00
Yukihiro "Matz" Matsumoto 03d1f7d6ec Merge pull request #6743 from mruby/fix/words-chunking 2026-03-12 14:17:38 +09:00
Yukihiro "Matz" Matsumoto 9239a9e0ef pre-commit: fix prettier formatting in doc/guides/capi.md
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 14:05:48 +09:00
Yukihiro "Matz" Matsumoto 62cf0dc17a codegen.c: chunk %w() and %i() literals to reduce register pressure
Apply the same chunking strategy used for regular array literals
to %w() and %i() literal arrays in gen_literal_array(). Fixes #6740.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 12:12:50 +09:00
Yukihiro "Matz" Matsumoto 12af8f513e Merge pull request #6742 from mruby/fix/remove-markdown-link-check 2026-03-12 11:52:45 +09:00
Yukihiro "Matz" Matsumoto 6a7561da5f pre-commit: remove JSON references from prettier hook
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 11:41:17 +09:00
Yukihiro "Matz" Matsumoto ab378ec01e Merge pull request #6690 from jbampton/cleanup-prettier-pre-commit 2026-03-12 11:37:25 +09:00
Yukihiro "Matz" Matsumoto 2d00f4a284 Merge pull request #6739 from mimaki/fix-msys2-build-error 2026-03-12 11:36:53 +09:00
Yukihiro "Matz" Matsumoto 628cf498a7 pre-commit: remove markdown-link-check hook
External link checkers are inherently flaky in CI due to
websites blocking automated requests (e.g. 403 errors).
Also remove JSON hooks (pretty-format-json, check-json)
since no JSON files remain in the repository.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 11:32:37 +09:00
mimaki 77f6ffecc7 Updates build script to support MSYS2 drive letters, fixing build error with MSYS2. 2026-03-11 11:31:55 +09:00
John Bampton 626b2fa469 Put manual hooks in separate workflow file 2026-03-11 10:29:57 +10:00
Yukihiro "Matz" Matsumoto cfc83bb6ac Merge pull request #6734 from mruby/fix/array-chunking 2026-03-10 17:01:28 +09:00
Yukihiro "Matz" Matsumoto 46e8101c03 Merge pull request #6733 from mruby/fix/presym-include 2026-03-10 16:59:51 +09:00
Yukihiro "Matz" Matsumoto fff7db05bf Merge pull request #6732 from mruby/fix/language-md-markup 2026-03-10 16:58:34 +09:00
Yukihiro "Matz" Matsumoto f98d6414dc codegen.c: chunk array literals at 64 elements to reduce register pressure
Array literals were being built by loading all elements into registers
before constructing the array, requiring nregs proportional to the array
size (e.g. nregs=99 for 100 elements). This exceeds mruby/c's register
limit. Restore 3.4-era chunking at GEN_LIT_ARY_MAX (64) elements.

fixes mruby/mruby#6731

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 16:50:59 +09:00
Yukihiro "Matz" Matsumoto 8956c5abb5 mruby.h: include mruby/presym.h for all source files
Since presym is now mandatory, mruby.h includes presym.h so that
MRB_SYM() macros are available everywhere without explicit include.
Remove redundant #include <mruby/presym.h> from all source files.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 16:50:58 +09:00
Yukihiro "Matz" Matsumoto 8f3917f361 language.md: remove unnecessary bold markup from "operator"
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 16:50:54 +09:00
Yukihiro "Matz" Matsumoto 72c9e5d027 Merge pull request #6598 from dearblue/method_missing 2026-03-09 16:38:08 +09:00
Yukihiro "Matz" Matsumoto 295b40534f Merge pull request #6730 from dearblue/presym 2026-03-09 10:35:42 +09:00
Yukihiro "Matz" Matsumoto 5acc520a1e Merge pull request #6729 from dearblue/gensym 2026-03-09 10:34:02 +09:00
dearblue f6f1a42039 Simplifying presym file generation actions
By performing output to presym files after header files, there is no longer a need to check for the existence of header files.
Furthermore, concentrating the file output logic into an "if" block eliminates the need for the `update` variable.

Strict atomicity between presym files and header files is still not guaranteed, as before.
If atomicity is truly required, it can be achieved by deleting the presym file before updating the header files.
2026-03-08 22:45:45 +09:00
dearblue 9fff63b436 Simplifying dependency addition for gensym task
The `gensym_task` variable was only used for dependency addition and is no longer needed.
2026-03-08 22:43:47 +09:00
Yukihiro "Matz" Matsumoto 17ab42d4c9 Merge pull request #6728 from mruby/dependabot/github_actions/actions/upload-artifact-7 2026-03-06 08:17:12 +09:00
dependabot[bot] fcb665b88c build(deps): bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 14:52:19 +00:00
mimaki 1d34c3bed5 Update version to 4.0.0RC. 4.0.0-rc 2026-03-05 11:58:41 +09:00
mimaki 18a1c33fd4 Merge remote-tracking branch 'origin' into stable 2026-03-05 11:14:03 +09:00
Yukihiro "Matz" Matsumoto 64263ebcea Merge pull request #6727 from leviongit/lims/ovld 2026-03-05 08:49:54 +09:00
leviongit 87f88a1ce8 fix grammar
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-03 13:58:23 +01:00
leviongit ab06ed825a change wording of the "overloading" section
the previous wording may have been taken as mruby not permitting the
overloading of operators on any class
2026-03-03 13:49:03 +01:00
Yukihiro "Matz" Matsumoto 736ec46ba0 version.h: bump version to mruby 4.0.0
update MRUBY_RUBY_VERSION to "4.0", MRUBY_RELEASE_MAJOR to 4,
MRUBY_RELEASE_MINOR to 0. update README.md references accordingly.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-03 11:10:18 +09:00
Yukihiro "Matz" Matsumoto a3861dcb53 vm.c: scope down tc variable from function to block scope
Inline L_DEF_METHOD body into OP_TDEF and OP_SDEF, making `tc`
(target class) a block-local variable in each case. This eliminates
the cross-case goto and frees one register at function scope.

`ch` (catch handler) cannot be scoped down because UNWIND_ENSURE
sets it before goto L_CATCH_TAGGED_BREAK where ch->target is
consumed (cross-goto flow requires function-scope visibility).

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-02 12:04:48 +09:00
Yukihiro "Matz" Matsumoto e94adf1d57 AUTHORS: update entries [ci skip] 2026-03-02 11:50:38 +09:00
Yukihiro "Matz" Matsumoto 02877f043a amalgamation.md: document platform dependency of HAL gems
Amalgamated files include HAL gem source code selected at build time,
making them platform-specific. Document this as expected behavior.

Ref #6726.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-02 10:34:55 +09:00
Yukihiro "Matz" Matsumoto b9a1a1fb23 presym.rake: add presym dependencies for all builds, not just internal
Previously, explicit .o => presym.list_path dependencies were only
added for internal builds (mrbc sub-builds). When only a CrossBuild
is configured without an explicit Build.new, the implicit host build
is not internal, so its .o files had no ordering against presym header
generation. This caused "mruby/presym/id.h not found" errors when the
cross build's presym scanning triggered host compilation.

Fixes #6725.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-02 10:23:35 +09:00
Yukihiro "Matz" Matsumoto 74267ce91e error.h: fix RBreak size overflow on 32-bit platforms with MRB_NO_BOXING
On 32-bit platforms where alignof(int64_t) == 8 (ARM, MIPS, PowerPC,
RISC-V, MinGW), struct RBreak with MRB_USE_RBREAK_VALUE_UNION was 24
bytes (6 words) due to alignment padding before the union
mrb_value_union field. This exceeds the 5-word RVALUE limit, causing
a static assertion failure.

Replace union mrb_value_union with uint32_t[] storage (alignof == 4)
and use memcpy for value access. This gives exactly 20 bytes on all
32-bit platforms. Ref #6722

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-02 09:56:25 +09:00
Yukihiro "Matz" Matsumoto 98bc495fd2 getting-started.md: add links to language and C API guides
Co-authored-by: Claude <noreply@anthropic.com>
2026-02-28 11:35:28 +09:00
Yukihiro "Matz" Matsumoto 0313800b10 doc: add README.md as documentation index
Organizes 22 doc files by audience (getting started, embedders,
contributors) so visitors can find the right document quickly.
Rendered automatically by GitHub when browsing the doc/ directory.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-28 10:42:54 +09:00
Yukihiro "Matz" Matsumoto 438a3bdffc docs: fix version labels, add navigation aids
limitations.md: use consistent CRuby/mruby labels for remaining
entries that still had specific version strings.

language.md: add upfront summary of major CRuby differences so
porting developers see the key gotchas before reading the full doc.

capi.md: add table of contents for navigating the 800+ line
reference.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 22:03:39 +09:00
Yukihiro "Matz" Matsumoto 3ce3453e9c docs: improve usability of new documentation
language.md: reorganize stdlib tables by class name instead of gem
name so users can quickly find "does mruby have Time/File/Set?"

capi.md: fix mrb_protect example (mrb->exc is cleared after protect,
so mrb_print_error does not work; show mrb_inspect instead); fix
fiber yield example to show correct usage as return value.

gc.md, compiler.md, vm.md: add "read this if" guidance paragraphs
to help developers decide whether they need each document.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 19:03:29 +09:00
Yukihiro "Matz" Matsumoto 1c7b9b1f26 architecture.md: add cross-references to standalone internal docs
Replace duplicated GC, compiler, and VM details with concise
summaries linking to gc.md, compiler.md, and vm.md.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 18:36:09 +09:00
Yukihiro "Matz" Matsumoto c561b21d43 vm.md: add VM internals documentation
Covers execution context, call frames, stack layout, argument
encoding, dispatch loop, method lookup with cache, exception
handling, closure environments, and fiber switching.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 18:36:04 +09:00
Yukihiro "Matz" Matsumoto 95954d3905 compiler.md: add compiler pipeline documentation
Covers parser/lexer, code generator, IRep structure, operand
encoding with OP_EXT1/2/3, OP_ENTER aspec format, presym system,
and RITE binary format.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 18:35:58 +09:00
Yukihiro "Matz" Matsumoto 985b5108d5 gc.md: add GC internals documentation
Covers heap structure, tri-color marking, incremental phases, gray
stack, write barriers, arena management, generational mode, and
tuning parameters.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 18:35:52 +09:00