зеркало из https://github.com/github/ruby.git
* test/ruby/envutil.rb (invoke_ruby): call to_str for stdin_data to
reject non-string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
77088d6672
Коммит
71ab182911
|
@ -1,3 +1,8 @@
|
|||
Sun Dec 13 20:55:30 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/ruby/envutil.rb (invoke_ruby): call to_str for stdin_data to
|
||||
reject non-string.
|
||||
|
||||
Sun Dec 13 20:26:57 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ruby.c (rb_parser_dump_tree): add prototype.
|
||||
|
|
|
@ -83,7 +83,7 @@ module EnvUtil
|
|||
in_c.close
|
||||
out_c.close if capture_stdout
|
||||
err_c.close if capture_stderr
|
||||
in_p.write stdin_data
|
||||
in_p.write stdin_data.to_str
|
||||
in_p.close
|
||||
th_stdout = Thread.new { out_p.read } if capture_stdout
|
||||
th_stderr = Thread.new { err_p.read } if capture_stderr
|
||||
|
|
|
@ -399,7 +399,7 @@ class TestObject < Test::Unit::TestCase
|
|||
def test_superclass_method
|
||||
bug2312 = '[ruby-dev:39581]'
|
||||
assert_in_out_err(["-e", "module Enumerable;undef min;end; (1..2).min{}"],
|
||||
[], [], /no superclass method/, bug2312)
|
||||
"", [], /no superclass method/, bug2312)
|
||||
end
|
||||
|
||||
def test_specific_eval_with_wrong_arguments
|
||||
|
|
|
@ -4,7 +4,7 @@ require_relative 'ruby/envutil'
|
|||
# mathn redefines too much. It must be isolated to child processes.
|
||||
class TestMathn < Test::Unit::TestCase
|
||||
def test_power
|
||||
assert_in_out_err ['-r', 'mathn', '-e', '1**2'], [], [], [], '[ruby-core:25740]'
|
||||
assert_in_out_err ['-r', 'mathn', '-e', '(1<<126)**2'], [], [], [], '[ruby-core:25740]'
|
||||
assert_in_out_err ['-r', 'mathn', '-e', '1**2'], "", [], [], '[ruby-core:25740]'
|
||||
assert_in_out_err ['-r', 'mathn', '-e', '(1<<126)**2'], "", [], [], '[ruby-core:25740]'
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче