Error

BUILD FAILED (macOS 12.6 on arm64 using ruby-build 20230815-3-g08aadf4)

Solution

RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC arch -arm64 rbenv install 2.6.6