Commit d88dbea5

d88dbea5d7d2Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 3 files · ~3 modified

Description

Fix member?/join/product dispatch, $PROGRAM_NAME, range predicates, File.binwrite/readable?

  • Array#member? now dispatches to include handler for typed arrays
  • PolyArray#join now handles 0-arg case (join with empty separator)
  • Add $PROGRAM_NAME/$0 global variables (mapped to argv[0])
  • Range#any?/all?/none?/one?/sum/min_by/max_by now bind block param as TY_INT
  • Add p(Time) using sp_time_inspect_v
  • File.binwrite dispatches to sp_file_write
  • File.readable? dispatches to sp_file_exist
  • File.directory?/file?/zero?/empty? predicates added
  • File.binwrite/readable? added to analyze type inference

Co-Authored-By: Claude Sonnet 4.6 [email protected]

Details

Commit
d88dbea5d7d2
Parent
2e54cbf8af94

lib/sp_runtime.hmodifiedView file

@@ -2103,6 +2103,7 @@
21032103 underlying issue is unconditional. */
21042104 typedef struct{const char**data;mrb_int len;}sp_Argv;
21052105 static sp_Argv sp_argv;
2106+static const char *sp_program_name = "";
21062107 static sp_StrArray *sp_argv_array_cache = NULL;
21072108 static sp_StrArray *sp_get_ARGV(void) {
21082109 if (!sp_argv_array_cache) {