summaryrefslogtreecommitdiffhomepage
path: root/test/ruby/errors_write_to_s_custom
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/errors_write_to_s_custom')
-rw-r--r--test/ruby/errors_write_to_s_custom/config.ru15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/errors_write_to_s_custom/config.ru b/test/ruby/errors_write_to_s_custom/config.ru
new file mode 100644
index 00000000..9eb06d1a
--- /dev/null
+++ b/test/ruby/errors_write_to_s_custom/config.ru
@@ -0,0 +1,15 @@
+app = Proc.new do |env|
+
+ class Custom
+ def to_s()
+ nil
+ end
+ end
+
+ e = Custom.new()
+
+ env['rack.errors'].write(e)
+ ['200', {'Content-Length' => '0'}, ['']]
+end
+
+run app