[pull] master from mruby:master#170
Merged
pull[bot] merged 13 commits intosysfce2:masterfrom Jan 3, 2026
Merged
Conversation
Remove unused mrb_stat typedef from file.c that conflicted with the mrb_stat() function in file_test.c when compiled as a single translation unit. Fix convert_stat() in hal-posix-io to handle st_atime macro correctly in both normal and amalgamated builds by extracting time values before undefining the macros. Co-authored-by: Claude <noreply@anthropic.com>
Add #undef lesser after last usage to prevent macro redefinition warnings when files are amalgamated into a single translation unit. Co-authored-by: Claude <noreply@anthropic.com>
Add #undef CASE at end of files to prevent macro redefinition warnings in amalgamation builds. Co-authored-by: Claude <noreply@anthropic.com>
Add #undef DONE after last usage to prevent macro redefinition warnings in amalgamation builds. Co-authored-by: Claude <noreply@anthropic.com>
Add ability to generate combined mruby.h and mruby.c files for
single-file embedding, similar to SQLite's amalgamation.
Usage: rake amalgam
Output: build/<target>/amalgam/mruby.{h,c}
Features:
- Headers concatenated in dependency order with guards stripped
- Sources concatenated with proper ordering (core, gems, mrblib)
- X-macro headers (ops.h) inlined at each include point
- Local includes automatically inlined
- Handles both src/ and core/ gem directory conventions
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Gems like mruby-task add preprocessor defines (MRB_USE_TASK_SCHEDULER) that affect mrb_state structure. The amalgamation generator now detects these defines from the build configuration and adds them at the top of mruby.h before struct definitions are encountered. Supported define patterns: MRB_USE_*, MRB_UTF8_*, HAVE_MRUBY_* Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
mruby-sleep: declare slp_tm before #ifdef _WIN32 block to fix undeclared variable error in non-Windows branch. hal-posix-socket: use #if defined(HAVE_SA_LEN) && HAVE_SA_LEN instead of #ifdef HAVE_SA_LEN, since mruby-socket defines HAVE_SA_LEN to 0 on non-BSD platforms. Co-authored-by: Claude <noreply@anthropic.com>
rational_new_b() expects both arguments to be bigints, but rational_new_f() was passing an integer value for the numerator when the exponent was negative. This caused a segfault in mrb_bint_reduce() which called RBIGINT() on the integer value. Test case: 5r**-92 (from oss-fuzz) Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )