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 | 6693a944f1c263df85cea992b2b138ff83e26146 (patch) | |
| tree | 7e4f65dc312f9faf645112c9604304ea79d16593 /test/stringio | |
| parent | 8ec88cd9f64398d5f3d595ad25e986ecec5aa393 (diff) | |
| download | ruby-6693a944f1c263df85cea992b2b138ff83e26146.tar.gz ruby-6693a944f1c263df85cea992b2b138ff83e26146.tar.xz ruby-6693a944f1c263df85cea992b2b138ff83e26146.zip | |
* ext/stringio/stringio.c (strio_each_codepoint): new method.
[ruby-core:23949]
* ext/stringio/stringio.c (strio_each_codepoint): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/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 8c72803b4..570f180fc 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)) |
