diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-08 20:29:12 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-08 20:29:12 -0700 |
commit | 9295053d9d92cd07644baedbbce6617c25616a13 (patch) | |
tree | 8ffda686cf9bfde331488f9f0e162ef06397fe48 /activesupport | |
parent | 54b0aeba64db8c52ac8c6cda2aaa81d8717b8549 (diff) | |
parent | f87888066a7280430fd48f7b76bf63d31dbce81a (diff) | |
download | rails-9295053d9d92cd07644baedbbce6617c25616a13.tar.gz rails-9295053d9d92cd07644baedbbce6617c25616a13.tar.bz2 rails-9295053d9d92cd07644baedbbce6617c25616a13.zip |
Merge pull request #1593 from r00k/master
Simplify boolean logic into ternary
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 2 |
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 |