[前][次][番号順一覧][スレッド一覧]

ruby-changes:3761

From: ko1@a...
Date: Sat, 26 Jan 2008 14:05:14 +0900 (JST)
Subject: [ruby-changes:3761] akr - Ruby:r15250 (trunk): fix test_too_long_string.

akr	2008-01-26 14:05:07 +0900 (Sat, 26 Jan 2008)

  New Revision: 15250

  Modified files:
    trunk/test/ruby/test_marshal.rb

  Log:
    fix test_too_long_string.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_marshal.rb?r1=15250&r2=15249&diff_format=u

Index: test/ruby/test_marshal.rb
===================================================================
--- test/ruby/test_marshal.rb	(revision 15249)
+++ test/ruby/test_marshal.rb	(revision 15250)
@@ -66,7 +66,8 @@
   end
 
   def test_too_long_string
-    (data = Marshal.dump(C.new("a")))[-2, 1] = "\003\377\377\377"
+    data = Marshal.dump(C.new("a".force_encoding("ascii-8bit")))
+    data[-2, 1] = "\003\377\377\377"
     e = assert_raise(ArgumentError, "[ruby-dev:32054]") {
       Marshal.load(data)
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]