diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-04-22 15:26:03 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-04-22 15:26:03 +0100 |
commit | 5f3f100ce2d689480da85abc88e5e940cf90189e (patch) | |
tree | 15c1a05a5308a9eea56d7f0889ac46d9cac5b57c /activesupport/lib/active_support/inflector.rb | |
parent | d758d996d1b66e2a65640f79f01ce2ac674d7ed5 (diff) | |
parent | ca49299434bc764b667cd86846d892e91a150ef3 (diff) | |
download | rails-5f3f100ce2d689480da85abc88e5e940cf90189e.tar.gz rails-5f3f100ce2d689480da85abc88e5e940cf90189e.tar.bz2 rails-5f3f100ce2d689480da85abc88e5e940cf90189e.zip |
Merge branch 'master' into active_model
Conflicts:
activeresource/lib/active_resource/validations.rb
Diffstat (limited to 'activesupport/lib/active_support/inflector.rb')
-rw-r--r-- | activesupport/lib/active_support/inflector.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index 3ed30bdf56..614afa1bd6 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -1,7 +1,8 @@ # encoding: utf-8 -require 'singleton' require 'iconv' +require 'active_support/core_ext/string/multibyte' + module ActiveSupport # The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, # and class names to foreign keys. The default inflections for pluralization, singularization, and uncountable words are kept @@ -30,7 +31,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 @@ -401,6 +404,3 @@ end # in case active_support/inflector is required without the rest of active_support require 'active_support/inflections' require 'active_support/core_ext/string/inflections' -unless String.included_modules.include?(ActiveSupport::CoreExtensions::String::Inflections) - String.send :include, ActiveSupport::CoreExtensions::String::Inflections -end |