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>
rename mrb_alloca() to mrb_temp_alloc() for clearer naming - the new name
better describes its purpose as GC-managed temporary allocation. keep
mrb_alloca() as a macro alias for backward compatibility.
apply mrb_temp_alloc() to fix potential memory leaks in:
- mruby-strftime: if mrb_str_cat() raises, allocated buffers now cleaned by GC
- mruby-io File.readlink: if mrb_str_new() raises, buffer now cleaned by GC
Co-authored-by: Claude <noreply@anthropic.com>
add validation to detect gnu extension %- flag and raise argumenterror
on msvc instead of crashing. update test to use portable %m format.
Co-authored-by: Claude <noreply@anthropic.com>
add new mruby-strftime gem providing time#strftime for formatting
time objects using standard format specifiers.
implementation features:
- uses mrb_time_get_tm() api for accessing time components
- handles nul bytes in format strings correctly
- dynamic buffer allocation for variable-length output
- comprehensive test coverage including edge cases
Co-authored-by: Claude <noreply@anthropic.com>