[前][次][番号順一覧][スレッド一覧]

ruby-changes:28096

From: shirosaki <ko1@a...>
Date: Sat, 6 Apr 2013 11:32:04 +0900 (JST)
Subject: [ruby-changes:28096] shirosaki:r40148 (trunk): * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):

shirosaki	2013-04-06 11:30:52 +0900 (Sat, 06 Apr 2013)

  New Revision: 40148

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40148

  Log:
    * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
      fix load path for encoding to run the test as stand-alone.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_require.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40147)
+++ ChangeLog	(revision 40148)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Apr  6 11:23:18 2013  Hiroshi Shirosaki  <h.shirosaki@g...>
+
+	* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
+	  fix load path for encoding to run the test as stand-alone.
+
 Sat Apr  6 09:54:20 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* pack.c (NATINT_LEN): fix definition order, must be after
Index: test/ruby/test_require.rb
===================================================================
--- test/ruby/test_require.rb	(revision 40147)
+++ test/ruby/test_require.rb	(revision 40148)
@@ -73,7 +73,9 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_require.rb#L73
       open(require_path, "wb") {}
       assert_in_out_err([], <<-INPUT, %w(:ok), [], bug8165)
         # coding: #{encoding}
-        $:.replace([IO::NULL] + $:.reject {|path| path !~ /\.ext/})
+        # leave paths for require encoding objects
+        enc_path = Regexp.new(RUBY_PLATFORM)
+        $:.replace([IO::NULL] + $:.reject {|path| enc_path !~ path})
         p :ok if require '#{require_path}'
         p :ng if require '#{require_path}'
       INPUT

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]