From 6470e47d6ac031283407189a92a9081ebf2a094f Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Thu, 5 Jun 2014 13:21:48 -0600 Subject: Remove optimization that was required with whiny nils Whiny nils is no longer a thing, so we no longer need this optimization --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'activerecord/lib/active_record') 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 -- cgit v1.2.3