1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Jeremy Kemper 2007-12-22 04:50:27 +00:00
parent 750f15bc26
commit ef6784f761

View file

@ -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>