Skip to content

Commit 3fd075b

Browse files
committed
[refactor] minor - simplify ruby code using &.
1 parent 99811e9 commit 3fd075b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/ruby/jruby/rack.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ class << self
1616
# @return [String] the application (root) path.
1717
# @see JRuby::Rack::Booter#export_global_settings
1818
def app_path
19-
@app_path ||= begin
20-
path = context.getRealPath('/') if context
21-
path || Dir.pwd
22-
end
19+
@app_path ||= (context&.getRealPath('/') || Dir.pwd)
2320
end
2421
# Set the application (root) path.
2522
# @see JRuby::Rack::Booter

0 commit comments

Comments
 (0)