aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/multibyte_chars_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/multibyte_chars_test.rb')
-rw-r--r--activesupport/test/multibyte_chars_test.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb
index e8493f4708..4afb63b949 100644
--- a/activesupport/test/multibyte_chars_test.rb
+++ b/activesupport/test/multibyte_chars_test.rb
@@ -1,6 +1,15 @@
require 'abstract_unit'
-$KCODE = 'UTF8' if RUBY_VERSION < '1.9'
+if RUBY_VERSION >= '1.9'
+ class CharsTest < Test::Unit::TestCase
+ def test_chars_returns_self
+ str = 'abc'
+ assert_equal str.object_id, str.chars.object_id
+ end
+ end
+else
+
+$KCODE = 'UTF8'
class CharsTest < Test::Unit::TestCase
@@ -175,3 +184,5 @@ class CharsTest < Test::Unit::TestCase
end
end
end
+
+end