We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
lines -= 5
1 parent 620ac03 commit f2d442eCopy full SHA for f2d442e
src/main/ruby/jruby/rack/error_app/show_status.rb
@@ -5,7 +5,7 @@ class JRuby::Rack::ErrorApp
5
# catches empty responses and replaces them with a site explaining the error.
6
#
7
# @note kindly adapted from on Rack::ShowStatus
8
- # @private internal API - likely won't exist in 1.2.x
+ # @private internal API - likely won't exist in 1.2
9
class ShowStatus
10
11
def initialize(app)
@@ -36,12 +36,7 @@ def call(env)
36
37
# @private
38
def h(obj)
39
- case obj
40
- when String
41
- Utils.escape_html(obj)
42
- else
43
- Utils.escape_html(obj.inspect)
44
- end
+ obj.is_a?(String) ? Utils.escape_html(obj) : Utils.escape_html(obj.inspect)
45
end
46
47
# :stopdoc:
0 commit comments