aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-06-06 08:49:38 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-06-06 08:49:38 -0700
commitb4fb80cbdab118125df0d48e74b6818fe5ec65d5 (patch)
treeb912b5041ee4a6a1ea7fdb3a743a7205b6bbd579 /railties
parent96123978ff5cbfe1ce56c2a3203b02007823335b (diff)
parentef9bbb87e8228940f768580a7d05d5feadec0d1e (diff)
downloadrails-b4fb80cbdab118125df0d48e74b6818fe5ec65d5.tar.gz
rails-b4fb80cbdab118125df0d48e74b6818fe5ec65d5.tar.bz2
rails-b4fb80cbdab118125df0d48e74b6818fe5ec65d5.zip
Merge pull request #6645 from amatsuda/reduce_string_instance
Reduce number of String instance
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/named_base.rb2
-rw-r--r--railties/test/railties/engine_test.rb4
2 files changed, 2 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb
index fcd289b2dd..b61a5fc69d 100644
--- a/railties/lib/rails/generators/named_base.rb
+++ b/railties/lib/rails/generators/named_base.rb
@@ -135,7 +135,7 @@ module Rails
end
def route_url
- @route_url ||= class_path.collect{|dname| "/" + dname }.join('') + "/" + plural_file_name
+ @route_url ||= class_path.collect {|dname| "/" + dname }.join + "/" + plural_file_name
end
# Tries to retrieve the application name or simple return application.
diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb
index 4437e2c8af..52c7fae6c6 100644
--- a/railties/test/railties/engine_test.rb
+++ b/railties/test/railties/engine_test.rb
@@ -1009,9 +1009,7 @@ YAML
boot_rails
- methods = Bukkits::Engine.helpers.public_instance_methods.collect(&:to_s).sort
- expected = ["bar", "baz"]
- assert_equal expected, methods
+ assert_equal [:bar, :baz], Bukkits::Engine.helpers.public_instance_methods.sort
end
test "setting priority for engines with config.railties_order" do