aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-05-19 23:29:39 +0200
committerXavier Noria <fxn@hashref.com>2010-05-19 23:29:39 +0200
commit7f07cc364a7ee7ceae21b29b54467fde0db93389 (patch)
tree7c9dd8aaeda68731756ee108a8318239b04c80f0 /activesupport/lib/active_support/core_ext/string
parentb9fcd8d71f94702463b97545bb70ce4727c5b47e (diff)
parent61001e766de974a8864c0bc2cf915888d277a0ea (diff)
downloadrails-7f07cc364a7ee7ceae21b29b54467fde0db93389.tar.gz
rails-7f07cc364a7ee7ceae21b29b54467fde0db93389.tar.bz2
rails-7f07cc364a7ee7ceae21b29b54467fde0db93389.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string')
-rw-r--r--activesupport/lib/active_support/core_ext/string/encoding.rb11
1 files changed, 11 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