aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-05-15 03:47:24 -0700
committerwycats <wycats@gmail.com>2010-05-16 22:43:35 +0400
commitaf0d1a88157942c6e6398dbf73891cff1e152405 (patch)
tree75053e7b5f3323c986e6a1e2d4a859e8010d284c /activesupport/lib/active_support/core_ext
parentf8432108e85c06ab8939869ece0297e72c21e7fe (diff)
downloadrails-af0d1a88157942c6e6398dbf73891cff1e152405.tar.gz
rails-af0d1a88157942c6e6398dbf73891cff1e152405.tar.bz2
rails-af0d1a88157942c6e6398dbf73891cff1e152405.zip
Initial work to improve the state of encodings for templates
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-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