mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_require.rb (TestRequire#test_require_twice): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0f24f94470
commit
fca3c408a7
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Aug 7 11:58:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_require.rb (TestRequire#test_require_twice): added.
|
||||
|
||||
Tue Aug 7 11:35:37 2012 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoid
|
||||
|
|
|
@ -105,6 +105,19 @@ class TestRequire < Test::Unit::TestCase
|
|||
assert(system(File.expand_path(EnvUtil.rubybin).sub(/\A(\w):/, '//127.0.0.1/\1$/'), "-rabbrev", "-e0"))
|
||||
end if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
|
||||
def test_require_twice
|
||||
Dir.mktmpdir do |tmp|
|
||||
req = File.join(tmp, "very_long_file_name.rb")
|
||||
File.write(req, "p :ok\n")
|
||||
assert(File.exist?(req))
|
||||
req[/.rb$/i] = ""
|
||||
assert_in_out_err(['--disable-gems'], <<-INPUT, %w(:ok), [])
|
||||
require "#{req}"
|
||||
require "#{req}"
|
||||
INPUT
|
||||
end
|
||||
end
|
||||
|
||||
def test_define_class
|
||||
begin
|
||||
require "socket"
|
||||
|
|
Loading…
Reference in a new issue