prefer AS's Inflector over Extlib
[arvados.git] / lib / google / inflection.rb
index cdf71ab4b26fe862ebd89376852f81ecde0040ec..127a6d4e25c5faec95f1a9bc3f7cc87ac6a33b8a 100644 (file)
 
 
 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