Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify boolean logic into ternary.

  • Loading branch information...
commit f87888066a7280430fd48f7b76bf63d31dbce81a 1 parent 54b0aeb
@r00k r00k authored
View
2  activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -113,7 +113,7 @@ def delegate(*methods)
raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method."
end
- prefix = options[:prefix] && "#{options[:prefix] == true ? to : options[:prefix]}_" || ''
+ prefix = options[:prefix] ? "#{options[:prefix] == true ? to : options[:prefix]}_" : ''
file, line = caller.first.split(':', 2)
line = line.to_i
Please sign in to comment.
Something went wrong with that request. Please try again.