aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-03-21 03:13:25 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-03-21 04:35:16 -0700
commitd5e87e3be0f7d90fe9ca02161a8ea4918edbc799 (patch)
tree1c3a4c8b0d127b8f5babcf00eaebff51abc4b8a2 /activesupport/lib/active_support/inflector.rb
parenta970e32c91848a720825302eebae4d4ca7f290fa (diff)
downloadrails-d5e87e3be0f7d90fe9ca02161a8ea4918edbc799.tar.gz
rails-d5e87e3be0f7d90fe9ca02161a8ea4918edbc799.tar.bz2
rails-d5e87e3be0f7d90fe9ca02161a8ea4918edbc799.zip
Simple singleton. We don't need the full monty.
Diffstat (limited to 'activesupport/lib/active_support/inflector.rb')
-rw-r--r--activesupport/lib/active_support/inflector.rb5
1 files changed, 3 insertions, 2 deletions
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