From 1a414e7f0d3a05fe07d60195335ed971fb48bcac Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Wed, 17 Sep 2014 15:38:51 +0000 Subject: [PATCH] prefer AS's Inflector over Extlib --- lib/google/inflection.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/google/inflection.rb b/lib/google/inflection.rb index cdf71ab4b..127a6d4e2 100644 --- a/lib/google/inflection.rb +++ b/lib/google/inflection.rb @@ -14,15 +14,11 @@ module Google - if defined?(ActiveSupport::Inflector) + begin + require 'active_support/inflector' INFLECTOR = ActiveSupport::Inflector - else - begin - require 'extlib/inflection' - INFLECTOR = Extlib::Inflection - rescue LoadError - require 'active_support/inflector' - INFLECTOR = ActiveSupport::Inflector - end + rescue LoadError + require 'extlib/inflection' + INFLECTOR = Extlib::Inflection end end