summaryrefslogtreecommitdiffhomepage
path: root/test/ruby/errors_write
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/ruby/errors_write/config.ru6
-rw-r--r--test/ruby/errors_write_int/config.ru6
-rw-r--r--test/ruby/errors_write_to_s_custom/config.ru15
3 files changed, 27 insertions, 0 deletions
diff --git a/test/ruby/errors_write/config.ru b/test/ruby/errors_write/config.ru
new file mode 100644
index 00000000..47619d6b
--- /dev/null
+++ b/test/ruby/errors_write/config.ru
@@ -0,0 +1,6 @@
+app = Proc.new do |env|
+ env['rack.errors'].write('Error in application')
+ ['200', {'Content-Length' => '0'}, ['']]
+end
+
+run app
diff --git a/test/ruby/errors_write_int/config.ru b/test/ruby/errors_write_int/config.ru
new file mode 100644
index 00000000..55d6c9d3
--- /dev/null
+++ b/test/ruby/errors_write_int/config.ru
@@ -0,0 +1,6 @@
+app = Proc.new do |env|
+ env['rack.errors'].write(1234567890)
+ ['200', {'Content-Length' => '0'}, ['']]
+end
+
+run app
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