ruby-changes:24600
From: usa <ko1@a...>
Date: Tue, 7 Aug 2012 11:59:20 +0900 (JST)
Subject: [ruby-changes:24600] usa:r36651 (trunk): * test/ruby/test_require.rb (TestRequire#test_require_twice): added.
usa 2012-08-07 11:59:04 +0900 (Tue, 07 Aug 2012) New Revision: 36651 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36651 Log: * test/ruby/test_require.rb (TestRequire#test_require_twice): added. Modified files: trunk/ChangeLog trunk/test/ruby/test_require.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36650) +++ ChangeLog (revision 36651) @@ -1,3 +1,7 @@ +Tue Aug 7 11:58:27 2012 NAKAMURA Usaku <usa@r...> + + * test/ruby/test_require.rb (TestRequire#test_require_twice): added. + Tue Aug 7 11:35:37 2012 Shugo Maeda <shugo@r...> * vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoid Index: test/ruby/test_require.rb =================================================================== --- test/ruby/test_require.rb (revision 36650) +++ test/ruby/test_require.rb (revision 36651) @@ -105,6 +105,19 @@ 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" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/