From 4c69f42048d556a33d874ea2e77d7d195fd2edb6 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 26 Aug 2025 13:31:46 +0100 Subject: [PATCH 1/4] .gitignore: build -> /build Allows lib/mruby/build/* to be seen --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f8cecb9c4..76861bb04 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ benchmark/**/*.dat benchmark/*.pdf benchmark/*.png bin -build +/build doc/api doc/capi compile_commands.json From 6b6aa830fdf8b370ed87d76438c6d92626b05e95 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 26 Aug 2025 13:33:06 +0100 Subject: [PATCH 2/4] Fix some typos in doc/guides/mrbgems.md --- doc/guides/mrbgems.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/guides/mrbgems.md b/doc/guides/mrbgems.md index 7087965e7..5c63ffb71 100644 --- a/doc/guides/mrbgems.md +++ b/doc/guides/mrbgems.md @@ -256,7 +256,7 @@ When more than one version requirements is passed, the dependency must satisfy a You can have default gem to use as dependency when it's not defined in your build configuration. When the last argument of `add_dependency` call is `Hash`, it will be treated as default gem information. -Its format is same as argument of method `MRuby::Build#gem`, expect that it can't be treated as path gem location. +Its format is same as argument of method `MRuby::Build#gem`, except that it can't be treated as path gem location. When a special version of dependency is required, use `MRuby::Build#gem` in the build configuration to override default gem. @@ -304,10 +304,10 @@ Your GEM can export include paths to another GEMs that depends on your GEM. By default, `/...absolute path.../{GEM_NAME}/include` will be exported. So it is recommended not to put GEM's local header files on include/. -These exports are retroactive. +These exports are transitive. For example: when B depends on C and A depends on B, A will get include paths exported by C. -Exported include_paths are automatically appended to GEM local include_paths by rake. +Exported `include_paths` are automatically appended to GEM local `include_paths` by rake. You can use `spec.export_include_paths` accessor if you want more complex build. ## C Extension From fc624020e6ac13427e61d97a8e63b68f73073939 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 26 Aug 2025 13:33:33 +0100 Subject: [PATCH 3/4] Rakefile: make the whole thing parallel unless SERIAL=1 Goes from 36s to 16s on my system (from clean): ``` $ 2>&1 time -p rake -m | rg real real 14.72 $ 2>&1 time -p rake | rg real real 14.72 $ 2>&1 time -p rake SERIAL=1 | rg real real 37.49 ``` --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 79ec84f67..4422f9688 100644 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,7 @@ MRUBY_ROOT = File.dirname(File.expand_path(__FILE__)) MRUBY_BUILD_HOST_IS_CYGWIN = RUBY_PLATFORM.include?('cygwin') MRUBY_BUILD_HOST_IS_OPENBSD = RUBY_PLATFORM.include?('openbsd') +Rake.application.options.always_multitask = true unless ENV["SERIAL"] Rake.verbose(false) if Rake.verbose == Rake::DSL::DEFAULT $LOAD_PATH << File.join(MRUBY_ROOT, "lib") From 2b3e5b1fd4d7d9ae0b171286e07b8a8c517863ea Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 26 Aug 2025 13:46:41 +0100 Subject: [PATCH 4/4] Fix warning about tautological comparison in pack.c Changing from signed char to unsigned char to make comparison valid rather than removing comparison. --- mrbgems/mruby-pack/src/pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mrbgems/mruby-pack/src/pack.c b/mrbgems/mruby-pack/src/pack.c index 43b6e0f32..1b068a8fa 100644 --- a/mrbgems/mruby-pack/src/pack.c +++ b/mrbgems/mruby-pack/src/pack.c @@ -1534,8 +1534,8 @@ pack_uu(mrb_state *mrb, mrb_value src, mrb_value dst, mrb_int didx, int count) static int unpack_uu(mrb_state *mrb, const void *src, mrb_int slen, mrb_value ary) { - const char *s = (const char*)src; - const char *send = s + slen; + const unsigned char *s = (const unsigned char*)src; + const unsigned char *send = s + slen; mrb_value result = mrb_str_new(mrb, 0, slen * 3 / 4); /* estimate result size */ char *dptr = RSTRING_PTR(result); char *dptr_start = dptr;