diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-08 17:32:06 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-09 10:42:30 -0700 |
commit | 11252e35b1756b025d8778c151f9f9a24057d1b1 (patch) | |
tree | a023a4142da8ba53e22e76f1f8907945f32c8781 /activerecord/lib | |
parent | f82bd31cb013cfba5bf3f5cad7356070fcefcc22 (diff) | |
download | rails-11252e35b1756b025d8778c151f9f9a24057d1b1.tar.gz rails-11252e35b1756b025d8778c151f9f9a24057d1b1.tar.bz2 rails-11252e35b1756b025d8778c151f9f9a24057d1b1.zip |
Boolean type casting creates fewer objects
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 2c03de0f17..d4c8a80448 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -138,7 +138,7 @@ module ActiveRecord if value == true || value == false value else - %w(true t 1).include?(value.to_s.downcase) + !(value.to_s !~ /\A(?:1|t|true)\Z/i) end end |