From d5e87e3be0f7d90fe9ca02161a8ea4918edbc799 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 21 Mar 2009 03:13:25 -0700 Subject: Simple singleton. We don't need the full monty. --- activesupport/lib/active_support/inflector.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/inflector.rb') diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index 3ed30bdf56..babc0d8668 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -1,5 +1,4 @@ # encoding: utf-8 -require 'singleton' require 'iconv' module ActiveSupport @@ -30,7 +29,9 @@ module ActiveSupport # pluralization and singularization rules that is runs. This guarantees that your rules run before any of the rules that may # already have been loaded. class Inflections - include Singleton + def self.instance + @__instance__ ||= new + end attr_reader :plurals, :singulars, :uncountables, :humans -- cgit v1.2.3