aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorBen Orenstein <ben.orenstein@gmail.com>2011-06-08 23:05:43 -0400
committerBen Orenstein <ben.orenstein@gmail.com>2011-06-08 23:11:19 -0400
commitf87888066a7280430fd48f7b76bf63d31dbce81a (patch)
tree8ffda686cf9bfde331488f9f0e162ef06397fe48 /activesupport
parent54b0aeba64db8c52ac8c6cda2aaa81d8717b8549 (diff)
downloadrails-f87888066a7280430fd48f7b76bf63d31dbce81a.tar.gz
rails-f87888066a7280430fd48f7b76bf63d31dbce81a.tar.bz2
rails-f87888066a7280430fd48f7b76bf63d31dbce81a.zip
Simplify boolean logic into ternary.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index 3a7652f5bf..1777a4b32d 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -113,7 +113,7 @@ class Module
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