ruby-changes:14165
From: nahi <ko1@a...>
Date: Thu, 3 Dec 2009 22:48:38 +0900 (JST)
Subject: [ruby-changes:14165] Ruby:r25983 (ruby_1_8): * test/stringio/test_stringio.rb: use 1.8 methods for easier backport.
nahi 2009-12-03 22:45:12 +0900 (Thu, 03 Dec 2009) New Revision: 25983 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25983 Log: * test/stringio/test_stringio.rb: use 1.8 methods for easier backport. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/test/stringio/test_stringio.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 25982) +++ ruby_1_8/ChangeLog (revision 25983) @@ -1,3 +1,7 @@ +Thu Dec 3 22:42:09 2009 NAKAMURA, Hiroshi <nahi@r...> + + * test/stringio/test_stringio.rb: use 1.8 methods for easier backport. + Thu Dec 3 22:20:51 2009 NAKAMURA, Hiroshi <nahi@r...> * test/stringio/test_stringio.rb: imported tests from trunk. it has 2 Index: ruby_1_8/test/stringio/test_stringio.rb =================================================================== --- ruby_1_8/test/stringio/test_stringio.rb (revision 25982) +++ ruby_1_8/test/stringio/test_stringio.rb (revision 25983) @@ -295,17 +295,17 @@ 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 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/