ruby-changes:32960
From: nagachika <ko1@a...>
Date: Wed, 19 Feb 2014 00:32:29 +0900 (JST)
Subject: [ruby-changes:32960] nagachika:r45039 (ruby_2_0_0): merge revision(s) r42175:
nagachika 2014-02-19 00:32:24 +0900 (Wed, 19 Feb 2014) New Revision: 45039 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45039 Log: merge revision(s) r42175: envutil.rb: encoding * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately): specify the encoding of source. Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/test/ruby/envutil.rb branches/ruby_2_0_0/test/ruby/test_require.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 45038) +++ ruby_2_0_0/version.h (revision 45039) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" -#define RUBY_RELEASE_DATE "2014-02-18" -#define RUBY_PATCHLEVEL 435 +#define RUBY_RELEASE_DATE "2014-02-19" +#define RUBY_PATCHLEVEL 436 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 18 +#define RUBY_RELEASE_DAY 19 #include "ruby/version.h" Index: ruby_2_0_0/test/ruby/test_require.rb =================================================================== --- ruby_2_0_0/test/ruby/test_require.rb (revision 45038) +++ ruby_2_0_0/test/ruby/test_require.rb (revision 45039) @@ -71,13 +71,16 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_require.rb#L71 end Dir.mkdir(File.dirname(require_path)) open(require_path, "wb") {} - assert_in_out_err([], <<-INPUT, %w(:ok), [], bug8165) - # coding: #{encoding} + assert_separately(%w[--disable=gems], <<-INPUT) # leave paths for require encoding objects + bug = "#{bug8165} require #{encoding} path" + path = "#{require_path}" enc_path = Regexp.new(Regexp.escape(RUBY_PLATFORM)) $:.replace([IO::NULL] + $:.reject {|path| enc_path !~ path}) - p :ok if require '#{require_path}' - p :ng if require '#{require_path}' + assert_nothing_raised(LoadError, bug) { + assert(require(path), bug) + assert(!require(path), bug) + } INPUT } end Index: ruby_2_0_0/test/ruby/envutil.rb =================================================================== --- ruby_2_0_0/test/ruby/envutil.rb (revision 45038) +++ ruby_2_0_0/test/ruby/envutil.rb (revision 45039) @@ -279,8 +279,11 @@ module Test https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/envutil.rb#L279 file ||= loc.path line ||= loc.lineno end + line -= 2 src = <<eom - require #{__dir__.dump}'/envutil';include Test::Unit::Assertions;begin;#{src} +# -*- coding: #{src.encoding}; -*- + require #{__dir__.dump}'/envutil';include Test::Unit::Assertions;begin +#{src} ensure puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}" end Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r42175 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/