mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_argf.rb (TestArgf#test_chars): since marshal data is
binary, shouldn't pass via text mode. use base64 encoded data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6190bb4d8a
commit
12d48f4ef2
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Nov 26 20:23:49 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_argf.rb (TestArgf#test_chars): since marshal data is
|
||||
binary, shouldn't pass via text mode. use base64 encoded data.
|
||||
|
||||
Mon Nov 26 19:45:18 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* ruby_atomic.h (ATOMIC_CAS): new macro for compare-and-exchange.
|
||||
|
|
|
@ -781,9 +781,9 @@ class TestArgf < Test::Unit::TestCase
|
|||
|
||||
def test_chars
|
||||
ruby('-e', <<-SRC, @t1.path, @t2.path, @t3.path) do |f|
|
||||
print Marshal.dump(ARGF.chars.to_a)
|
||||
print [Marshal.dump(ARGF.chars.to_a)].pack('m')
|
||||
SRC
|
||||
assert_equal(["1", "\n", "2", "\n", "3", "\n", "4", "\n", "5", "\n", "6", "\n"], Marshal.load(f.read))
|
||||
assert_equal(["1", "\n", "2", "\n", "3", "\n", "4", "\n", "5", "\n", "6", "\n"], Marshal.load(f.read.unpack('m').first))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue