This fixes the Ruby native extension's repeated enum `_const` accessor when the field is unset.
`METHOD_ENUM_GETTER` creates a Ruby array for repeated enum helpers, but it called `upb_Array_Size(msgval.array_val)` even when the repeated field was absent. In that case `upb_Message_GetFieldByDef()` returns a null array pointer.
The fix returns the newly-created empty Ruby array when `msgval.array_val` is null. Regression coverage checks both constructed and wire-decoded unset repeated enum messages.
Validation:
- `ruby -Ilib -Itests tests/basic.rb --name=test_enum_getter`
- GitHub CI is passing for the Ruby matrix and blocking checks.
`rake test` was also run locally; it built and ran the Ruby suite but reported one baseline-reproduced failure in `RepeatedFieldTest#test_sort_by!`, outside this enum getter path.
Closes#27848
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/27848 from Abhinav-143x:protobuf-ruby-enum-const-null-guard 1e215f9a6b
PiperOrigin-RevId: 929202019