ruby-changes:28490
From: nagachika <ko1@a...>
Date: Thu, 2 May 2013 00:16:16 +0900 (JST)
Subject: [ruby-changes:28490] nagachika:r40542 (ruby_2_0_0): merge revision(s) 39932,39934,39935,39937,39955,40491:
nagachika 2013-05-02 00:14:08 +0900 (Thu, 02 May 2013) New Revision: 40542 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40542 Log: merge revision(s) 39932,39934,39935,39937,39955,40491: Use assert_separately to speed up on test-all This creates large string and it pressure GC. Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/test/ruby/test_syntax.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 40541) +++ ruby_2_0_0/version.h (revision 40542) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-05-01" -#define RUBY_PATCHLEVEL 176 +#define RUBY_PATCHLEVEL 177 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 5 Index: ruby_2_0_0/test/ruby/test_syntax.rb =================================================================== --- ruby_2_0_0/test/ruby/test_syntax.rb (revision 40541) +++ ruby_2_0_0/test/ruby/test_syntax.rb (revision 40542) @@ -2,14 +2,23 @@ require 'test/unit' https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_syntax.rb#L2 require_relative 'envutil' class TestSyntax < Test::Unit::TestCase - def test_syntax - assert_nothing_raised(Exception) do - for script in Dir[File.expand_path("../../../{lib,sample,ext,test}/**/*.rb", __FILE__)].sort + def assert_syntax_files(test) + srcdir = File.expand_path("../../..", __FILE__) + srcdir = File.join(srcdir, test) + assert_separately(%W[--disable-gem -r#{__dir__}/envutil - #{srcdir}], + __FILE__, __LINE__, <<-'eom', timeout: Float::INFINITY) + dir = ARGV.shift + for script in Dir["#{dir}/**/*.rb"].sort assert_valid_syntax(IO::read(script), script) end - end + eom end + def test_syntax_lib; assert_syntax_files("lib"); end + def test_syntax_sample; assert_syntax_files("sample"); end + def test_syntax_ext; assert_syntax_files("ext"); end + def test_syntax_test; assert_syntax_files("test"); end + def test_defined_empty_argument bug8220 = '[ruby-core:53999] [Bug #8220]' assert_ruby_status(%w[--disable-gem], 'puts defined? ()', bug8220) Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r39932,39934-39935,39937,39955,40491 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/