From 1f4ff3687cc29ac2c824327f91e23eba8acd7bdd Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 9 Oct 2011 23:34:53 +0000 Subject: [PATCH] Rails3: controller: repositories: use to_s for revision parameter On Rails 3.0 and Ruby 1.8.7, following error raises. Error: test_revision(RepositoriesControllerTest): NoMethodError: undefined method `strip' for 1:Fixnum app/controllers/repositories_controller.rb:252:in `find_repository' test/functional/repositories_controller_test.rb:44:in `test_revision' git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7622 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 119ac826e..83e26acd1 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -249,7 +249,7 @@ class RepositoriesController < ApplicationController (render_404; return false) unless @repository @path = params[:path].join('/') unless params[:path].nil? @path ||= '' - @rev = params[:rev].blank? ? @repository.default_branch : params[:rev].strip + @rev = params[:rev].blank? ? @repository.default_branch : params[:rev].to_s.strip @rev_to = params[:rev_to] unless @rev.to_s.match(REV_PARAM_RE) && @rev_to.to_s.match(REV_PARAM_RE)