From c95002c284add2da69845f2a9407c5dd6592cb62 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 21 Dec 2007 11:21:43 +0000 Subject: 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 --- activesupport/test/multibyte_chars_test.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'activesupport/test/multibyte_chars_test.rb') 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 -- cgit v1.2.3