ruby-changes:15958
From: usa <ko1@a...>
Date: Wed, 19 May 2010 22:47:33 +0900 (JST)
Subject: [ruby-changes:15958] Ruby:r27901 (ruby_1_9_2): merge from trunk (r27887-r27889)
usa 2010-05-19 22:47:24 +0900 (Wed, 19 May 2010) New Revision: 27901 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27901 Log: merge from trunk (r27887-r27889) * test/win32ole/test_folderitem2_invokeverb.rb (test_invokeverb): should use assert_equal instead of assert in such cases. * test/dl/test_func.rb (test_sinf): sinf() doesn't exist in the standard of C. * test/csv/test_interface.rb (test_write_hash): may need to set binary mode when converter is specified. Modified files: branches/ruby_1_9_2/test/csv/test_interface.rb branches/ruby_1_9_2/test/dl/test_func.rb branches/ruby_1_9_2/test/win32ole/test_folderitem2_invokeverb.rb Index: ruby_1_9_2/test/win32ole/test_folderitem2_invokeverb.rb =================================================================== --- ruby_1_9_2/test/win32ole/test_folderitem2_invokeverb.rb (revision 27900) +++ ruby_1_9_2/test/win32ole/test_folderitem2_invokeverb.rb (revision 27901) @@ -64,7 +64,7 @@ # is found in context menu, if @shortcut links = find_link(@dummy_path) - assert(0, links.size) + assert_equal(0, links.size) # Now create shortcut to @dummy_path arg = WIN32OLE_VARIANT.new(@shortcut) @@ -72,7 +72,7 @@ # Now search shortcut to @dummy_path links = find_link(@dummy_path) - assert(1, links.size) + assert_equal(1, links.size) @lpath = links[0].path end end Index: ruby_1_9_2/test/dl/test_func.rb =================================================================== --- ruby_1_9_2/test/dl/test_func.rb (revision 27900) +++ ruby_1_9_2/test/dl/test_func.rb (revision 27901) @@ -22,8 +22,12 @@ end def test_sinf - f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'), - [TYPE_FLOAT]) + begin + f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'), + [TYPE_FLOAT]) + rescue DL::DLError + skip "libm may not have sinf()" + end assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001 end Index: ruby_1_9_2/test/csv/test_interface.rb =================================================================== --- ruby_1_9_2/test/csv/test_interface.rb (revision 27900) +++ ruby_1_9_2/test/csv/test_interface.rb (revision 27901) @@ -167,14 +167,14 @@ File.unlink(@path) lines = [{a: 1, b: 2, c: 3}, {a: 4, b: 5, c: 6}] - CSV.open( @path, "w", headers: true, - header_converters: :symbol ) do |csv| + CSV.open( @path, "wb", headers: true, + header_converters: :symbol ) do |csv| csv << lines.first.keys lines.each { |line| csv << line } end - CSV.open( @path, "r", headers: true, - converters: :all, - header_converters: :symbol ) do |csv| + CSV.open( @path, "rb", headers: true, + converters: :all, + header_converters: :symbol ) do |csv| csv.each { |line| assert_equal(lines.shift, line.to_hash) } end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/