diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-05 16:26:51 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-05 16:26:51 -0300 |
commit | aa54c91a151b47656320b511b30f546180202458 (patch) | |
tree | 1f3e5565b3442d03ee1518608f294eab12512edb /activerecord/lib/active_record | |
parent | 7cd4db0a986c035ebf61cddc0732bd9f2bd7ddeb (diff) | |
parent | 6470e47d6ac031283407189a92a9081ebf2a094f (diff) | |
download | rails-aa54c91a151b47656320b511b30f546180202458.tar.gz rails-aa54c91a151b47656320b511b30f546180202458.tar.bz2 rails-aa54c91a151b47656320b511b30f546180202458.zip |
Merge pull request #15536 from sgrif/sg-remove-whiny-nil-thing
Remove optimization that was required with whiny nils
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 0f20d52879..283ca81f94 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -503,14 +503,6 @@ module ActiveRecord # Extracts the value from a PostgreSQL column default definition. def extract_value_from_default(oid, default) # :nodoc: - # This is a performance optimization for Ruby 1.9.2 in development. - # If the value is nil, we return nil straight away without checking - # the regular expressions. If we check each regular expression, - # Regexp#=== will call NilClass#to_str, which will trigger - # method_missing (defined by whiny nil in ActiveSupport) which - # makes this method very very slow. - return default unless default - case default # Quoted types when /\A[\(B]?'(.*)'::/m |