From 8352287c725c09ad64db39bd54a69efdae3cdce4 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Feb 2008 23:05:59 +0000 Subject: Fix edge case with colons in times interpreted as bind variables by requiring that bind vars start with a letter. Closes #10519 [matrix9180] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8936 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 4f33b96034..fbbd118640 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1924,7 +1924,7 @@ module ActiveRecord #:nodoc: end def replace_named_bind_variables(statement, bind_vars) #:nodoc: - statement.gsub(/:(\w+)/) do + statement.gsub(/:([a-zA-Z]\w*)/) do match = $1.to_sym if bind_vars.include?(match) quote_bound_value(bind_vars[match]) -- cgit v1.2.3