mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
merge revision(s) r42175:
envutil.rb: encoding * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately): specify the encoding of source. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1b54468b73
commit
b4fa32f3f3
3 changed files with 14 additions and 8 deletions
|
@ -279,8 +279,11 @@ module Test
|
|||
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
|
||||
|
|
|
@ -71,13 +71,16 @@ class TestRequire < Test::Unit::TestCase
|
|||
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
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue