aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/multibyte_chars_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-21 11:21:43 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-21 11:21:43 +0000
commitc95002c284add2da69845f2a9407c5dd6592cb62 (patch)
tree49e2ae91459e7dfcc091e4113fdf38c3a04096dd /activesupport/test/multibyte_chars_test.rb
parent909b2c1acf2eb18b7a75a8cb8af0154fc948fb01 (diff)
downloadrails-c95002c284add2da69845f2a9407c5dd6592cb62.tar.gz
rails-c95002c284add2da69845f2a9407c5dd6592cb62.tar.bz2
rails-c95002c284add2da69845f2a9407c5dd6592cb62.zip
Multibyte: String#chars returns self for Ruby 1.9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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