From ef6784f761546b9558d977ae2d2f8333737de829 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 22 Dec 2007 04:50:27 +0000 Subject: 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 --- railties/lib/initializer.rb | 12 ++++++++---- 1 file 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 :active_record -- cgit v1.2.3