summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/changes.xml6
-rw-r--r--src/ruby/nxt_ruby.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/changes.xml b/docs/changes.xml
index e37c8219..8f871eb1 100644
--- a/docs/changes.xml
+++ b/docs/changes.xml
@@ -31,6 +31,12 @@ NGINX Unit updated to 1.29.0.
date="" time=""
packager="Nginx Packaging <nginx-packaging@f5.com>">
+<change type="feature">
+<para>
+support rack v3 in ruby applications.
+</para>
+</change>
+
<change type="bugfix">
<para>
fix HTTP cookie parsing when the value contains an equals sign.
diff --git a/src/ruby/nxt_ruby.c b/src/ruby/nxt_ruby.c
index 1b55e7ef..cc287e0e 100644
--- a/src/ruby/nxt_ruby.c
+++ b/src/ruby/nxt_ruby.c
@@ -480,12 +480,17 @@ nxt_ruby_rack_init(nxt_ruby_rack_init_t *rack_init)
rackup = rb_protect(nxt_ruby_rack_parse_script,
(VALUE) (uintptr_t) rack_init, &state);
- if (nxt_slow_path(TYPE(rackup) != T_ARRAY || state != 0)) {
+
+ if (nxt_slow_path(state != 0)) {
nxt_ruby_exception_log(NULL, NXT_LOG_ALERT,
"Failed to parse rack script");
return Qnil;
}
+ if (TYPE(rackup) != T_ARRAY) {
+ return rackup;
+ }
+
if (nxt_slow_path(RARRAY_LEN(rackup) < 1)) {
nxt_alert(rack_init->task, "Ruby: Invalid rack config file");
return Qnil;