prefer AS's Inflector over Extlib
[arvados.git] / lib / google / inflection.rb
index 0724e2c15d2ee786c16c72a2fa22085b57d4c135..127a6d4e25c5faec95f1a9bc3f7cc87ac6a33b8a 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 module Google
-  if defined?(ActiveSupport::Inflector)
+  begin
+    require 'active_support/inflector'
     INFLECTOR = ActiveSupport::Inflector
-  else
+  rescue LoadError
     require 'extlib/inflection'
     INFLECTOR = Extlib::Inflection
   end