aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorJurriaan Pruis <email@jurriaanpruis.nl>2012-04-03 15:16:09 +0200
committerJurriaan Pruis <email@jurriaanpruis.nl>2012-04-03 15:16:09 +0200
commit2d8396fc9fbea9189e9e945e41e643925da5b2cb (patch)
tree9185737cf020abf95ab2bad80c1bdc281c441808 /activerecord/lib/active_record/connection_adapters
parent0cc6c5fec235cca6d7eb85d4f849536db8566e93 (diff)
downloadrails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.tar.gz
rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.tar.bz2
rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.zip
Updated/changed useless tr/gsubs
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index 8b9e830040..0784b2d11a 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -16,7 +16,7 @@ module ActiveRecord
# Truncates a table alias according to the limits of the current adapter.
def table_alias_for(table_name)
- table_name[0...table_alias_length].gsub(/\./, '_')
+ table_name[0...table_alias_length].tr('.', '_')
end
# Checks to see if the table +table_name+ exists on the database.
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index 3d8dfab05c..91e1482ffd 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -339,9 +339,9 @@ module ActiveRecord
when /^null$/i
field["dflt_value"] = nil
when /^'(.*)'$/
- field["dflt_value"] = $1.gsub(/''/, "'")
+ field["dflt_value"] = $1.gsub("''", "'")
when /^"(.*)"$/
- field["dflt_value"] = $1.gsub(/""/, '"')
+ field["dflt_value"] = $1.gsub('""', '"')
end
SQLiteColumn.new(field['name'], field['dflt_value'], field['type'], field['notnull'].to_i == 0)