diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-22 08:23:30 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-22 08:23:30 +0000 |
commit | fa31dda1f839909a96cdcc6339d4674e80173ac2 (patch) | |
tree | 7e4f65dc312f9faf645112c9604304ea79d16593 /test/stringio | |
parent | b205b5e7b62529435ad566c253ebd5cf9ade7033 (diff) |
* ext/stringio/stringio.c (strio_each_codepoint): new method.
[ruby-core:23949]
* ext/stringio/stringio.c (strio_each_codepoint): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/stringio')
-rw-r--r-- | test/stringio/test_stringio.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb index 8c72803b45..570f180fc7 100644 --- a/test/stringio/test_stringio.rb +++ b/test/stringio/test_stringio.rb @@ -340,6 +340,11 @@ class TestStringIO < Test::Unit::TestCase assert_equal(%w(1 2 3 4), f.each_char.to_a) end + def test_each_codepoint + f = StringIO.new("1234") + assert_equal([49, 50, 51, 52], f.each_codepoint.to_a) + end + def test_gets2 f = StringIO.new("foo\nbar\nbaz\n") assert_equal("fo", f.gets(2)) |