Skip to content

Commit 781f26d

Browse files
committed
fix frozen string literal warning
1 parent 51f3e34 commit 781f26d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/pry-rails/commands/find_route.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
class PryRails::FindRoute < Pry::ClassCommand
23
match 'find-route'
34
group 'Rails'
@@ -51,7 +52,7 @@ def show_routes(&block)
5152
all_routes = routes.select(&block)
5253
if all_routes.any?
5354
grouped_routes = all_routes.group_by { |route| route.defaults[:controller] }
54-
result = grouped_routes.each_with_object("") do |(controller, routes), res|
55+
result = grouped_routes.each_with_object(String.new) do |(controller, routes), res|
5556
res << "Routes for " + bold(controller.to_s.camelize + "Controller") + "\n"
5657
res << "--\n"
5758
routes.each do |route|

0 commit comments

Comments
 (0)