aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-22 04:50:27 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-22 04:50:27 +0000
commitef6784f761546b9558d977ae2d2f8333737de829 (patch)
tree6611b231491020612feb6d552aacccaa501a0748 /railties/lib
parent750f15bc264eacd0d008182052e8df7b04971b5c (diff)
downloadrails-ef6784f761546b9558d977ae2d2f8333737de829.tar.gz
rails-ef6784f761546b9558d977ae2d2f8333737de829.tar.bz2
rails-ef6784f761546b9558d977ae2d2f8333737de829.zip
Ruby 1.9 compat: initializer only sets kcode for Ruby < 1.9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/initializer.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 4b522e2920..5aed10afb5 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -217,11 +217,15 @@ module Rails
end
end
- # This initialization sets $KCODE to 'u' to enable the multibyte safe operations.
- # Plugin authors supporting other encodings should override this behaviour and
- # set the relevant +default_charset+ on ActionController::Base
+ # For Ruby 1.8, this initialization sets $KCODE to 'u' to enable the
+ # multibyte safe operations. Plugin authors supporting other encodings
+ # should override this behaviour and set the relevant +default_charset+
+ # on ActionController::Base.
+ #
+ # For Ruby 1.9, this does nothing. Specify the default encoding in the Ruby
+ # shebang line if you don't want UTF-8.
def initialize_encoding
- $KCODE='u'
+ $KCODE='u' if RUBY_VERSION < '1.9'
end
# This initialization routine does nothing unless <tt>:active_record</tt>