diff options
author | Akira Matsuda <ronnie@dio.jp> | 2012-06-05 07:05:29 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2012-06-06 19:33:38 +0900 |
commit | 2635a29fec043076427d9fd19c330d2bcf7ab55d (patch) | |
tree | 0e7fcb8725ea1b8e1fb51769ee308a607f207fc7 | |
parent | 099639670a9a02ea2847117a541c4f48585951ad (diff) | |
download | rails-2635a29fec043076427d9fd19c330d2bcf7ab55d.tar.gz rails-2635a29fec043076427d9fd19c330d2bcf7ab55d.tar.bz2 rails-2635a29fec043076427d9fd19c330d2bcf7ab55d.zip |
no need to to_s here. Both String and Symbol can be interpolated into String
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index fbef27c76a..39a1240c61 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -107,7 +107,6 @@ class Module raise ArgumentError, 'Delegation needs a target. Supply an options hash with a :to key as the last argument (e.g. delegate :hello, :to => :greeter).' end - to = to.to_s prefix, allow_nil = options.values_at(:prefix, :allow_nil) if prefix == true && to =~ /^[^a-z_]/ @@ -125,8 +124,6 @@ class Module line = line.to_i methods.each do |method| - method = method.to_s - # Attribute writer methods only accept one argument. Makes sure []= # methods still accept two arguments. definition = (method =~ /[^\]]=$/) ? 'arg' : '*args, &block' |