summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-03 13:45:12 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-03 13:45:12 +0000
commit6e063278176cc624a22c7db612d702ac92d61384 (patch)
treee2f7ebe87c051fbc7966b6770ccae884f032187d /test
parent2471c52c2a9633cd58c60c9109d84c60425c8c4d (diff)
* test/stringio/test_stringio.rb: use 1.8 methods for easier backport.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/stringio/test_stringio.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 4a6d7efdce..8e52065dd4 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -295,17 +295,17 @@ class TestStringIO < Test::Unit::TestCase
f = StringIO.new("1234")
a = []
f.each_byte {|c| a << c }
- assert_equal(%w(1 2 3 4).map {|c| c.ord }, a)
+ assert_equal(%w(1 2 3 4).map {|c| c[0] }, a)
ensure
f.close unless f.closed?
end
def test_getbyte
f = StringIO.new("1234")
- assert_equal("1".ord, f.getbyte)
- assert_equal("2".ord, f.getbyte)
- assert_equal("3".ord, f.getbyte)
- assert_equal("4".ord, f.getbyte)
+ assert_equal(?1, f.getbyte)
+ assert_equal(?2, f.getbyte)
+ assert_equal(?3, f.getbyte)
+ assert_equal(?4, f.getbyte)
assert_equal(nil, f.getbyte)
ensure
f.close unless f.closed?
@@ -338,7 +338,7 @@ class TestStringIO < Test::Unit::TestCase
s = "1234"
f = StringIO.new(s, "r")
assert_equal(?1, f.getc)
- f.ungetc("y".ord)
+ f.ungetc(?y)
assert_equal(?y, f.getc)
assert_equal(?2, f.getc)
ensure