Permalink
Browse files

no need to to_s here. Both String and Symbol can be interpolated into…

… String
  • Loading branch information...
amatsuda committed Jun 4, 2012
1 parent 0996396 commit 2635a29fec043076427d9fd19c330d2bcf7ab55d
Showing with 0 additions and 3 deletions.
  1. +0 −3 activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -107,7 +107,6 @@ def delegate(*methods)
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 @@ def delegate(*methods)
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'

0 comments on commit 2635a29

Please sign in to comment.