diff options
author | wycats <wycats@gmail.com> | 2010-05-17 19:41:54 +0400 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-05-17 19:41:54 +0400 |
commit | 80b60671f7216c571ea8711d1de8ca824aefbe54 (patch) | |
tree | c84be59be24bbd978b257ac526eb9b0f9051389f /activesupport/lib | |
parent | 5371242384171dc0255716e31e9257ddeec17d10 (diff) | |
download | rails-80b60671f7216c571ea8711d1de8ca824aefbe54.tar.gz rails-80b60671f7216c571ea8711d1de8ca824aefbe54.tar.bz2 rails-80b60671f7216c571ea8711d1de8ca824aefbe54.zip |
Revert "Moved encoding work in progress to a feature branch."
This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/encoding.rb | 11 | ||||
-rw-r--r-- | activesupport/lib/active_support/ruby/shim.rb | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/encoding.rb b/activesupport/lib/active_support/core_ext/string/encoding.rb new file mode 100644 index 0000000000..d4781bfe0c --- /dev/null +++ b/activesupport/lib/active_support/core_ext/string/encoding.rb @@ -0,0 +1,11 @@ +class String + if defined?(Encoding) && "".respond_to?(:encode) + def encoding_aware? + true + end + else + def encoding_aware? + false + end + end +end
\ No newline at end of file diff --git a/activesupport/lib/active_support/ruby/shim.rb b/activesupport/lib/active_support/ruby/shim.rb index 4a9ac920e8..608b3fe4b9 100644 --- a/activesupport/lib/active_support/ruby/shim.rb +++ b/activesupport/lib/active_support/ruby/shim.rb @@ -15,6 +15,7 @@ require 'active_support/core_ext/enumerable' require 'active_support/core_ext/process/daemon' require 'active_support/core_ext/string/conversions' require 'active_support/core_ext/string/interpolation' +require 'active_support/core_ext/string/encoding' require 'active_support/core_ext/rexml' require 'active_support/core_ext/time/conversions' require 'active_support/core_ext/file/path' |