The patch needed should be as follows:
diff --git a/lang/ruby/rubyversion.mk b/lang/ruby/rubyversion.mk
index 3ef63e8..83c6b17 100644
--- a/lang/ruby/rubyversion.mk
+++ b/lang/ruby/rubyversion.mk
@@ -193,6 +193,8 @@ RUBY_STATICLIB=
${RUBY_VER}.${RUBY_API_VERSION}-static.a
.endif
.elif ${OPSYS} == "Linux"
_RUBY_SHLIBALIAS=
${RUBY_VER}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
+.elif ${OPSYS} == "SunOS"
+_RUBY_SHLIBALIAS= ${RUBY_VER}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}
.endif
.if !empty(_RUBY_SHLIBALIAS)