From 2635a29fec043076427d9fd19c330d2bcf7ab55d Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Tue, 5 Jun 2012 07:05:29 +0900 Subject: no need to to_s here. Both String and Symbol can be interpolated into String --- activesupport/lib/active_support/core_ext/module/delegation.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'activesupport/lib/active_support/core_ext') 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' -- cgit v1.2.3