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

ruby-changes:16142

From: nobu <ko1@a...>
Date: Mon, 31 May 2010 04:06:33 +0900 (JST)
Subject: [ruby-changes:16142] Ruby:r28102 (trunk, ruby_1_9_2): * file.c (file_expand_path): check if expanded dname encoding is

nobu	2010-05-31 04:03:47 +0900 (Mon, 31 May 2010)

  New Revision: 28102

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

  Log:
    * file.c (file_expand_path): check if expanded dname encoding is
      compatible with fname, not just copying.  [ruby-core:30516]
    
    * test/ruby/test_beginendblock.rb (test_endblockwarn): needs
      encoding comment.

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/file.c
    branches/ruby_1_9_2/test/ruby/test_beginendblock.rb
    trunk/ChangeLog
    trunk/file.c
    trunk/test/ruby/test_beginendblock.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28101)
+++ ChangeLog	(revision 28102)
@@ -1,3 +1,11 @@
+Mon May 31 04:03:43 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* file.c (file_expand_path): check if expanded dname encoding is
+	  compatible with fname, not just copying.  [ruby-core:30516]
+
+	* test/ruby/test_beginendblock.rb (test_endblockwarn): needs
+	  encoding comment.
+
 Mon May 31 02:17:54 2010  Yukihiro Matsumoto  <matz@r...>
 
 	* insns.def (defined): respond_to_missing? may not be available
Index: test/ruby/test_beginendblock.rb
===================================================================
--- test/ruby/test_beginendblock.rb	(revision 28101)
+++ test/ruby/test_beginendblock.rb	(revision 28102)
@@ -55,6 +55,7 @@
     errout = Tempfile.new(self.class.name)
 
     launcher << <<EOF
+# -*- coding: #{ruby.encoding.name} -*-
 errout = ARGV.shift
 STDERR.reopen(File.open(errout, "w"))
 STDERR.sync = true
Index: file.c
===================================================================
--- file.c	(revision 28101)
+++ file.c	(revision 28102)
@@ -2887,7 +2887,7 @@
 		xfree(dir);
 		rb_enc_associate_index(result, rb_filesystem_encindex());
 	    }
-	    else rb_enc_copy(result, fname);
+	    else rb_enc_check(result, fname);
 	    p = chompdirsep(skiproot(buf));
 	    s += 2;
 	}
@@ -2897,7 +2897,7 @@
 	if (!NIL_P(dname)) {
 	    file_expand_path(dname, Qnil, abs_mode, result);
 	    BUFINIT();
-	    rb_enc_copy(result, fname);
+	    rb_enc_check(result, fname);
 	}
 	else {
 	    char *dir = my_getcwd();
Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 28101)
+++ ruby_1_9_2/ChangeLog	(revision 28102)
@@ -1,3 +1,11 @@
+Mon May 31 04:03:43 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* file.c (file_expand_path): check if expanded dname encoding is
+	  compatible with fname, not just copying.  [ruby-core:30516]
+
+	* test/ruby/test_beginendblock.rb (test_endblockwarn): needs
+	  encoding comment.
+
 Mon May 31 01:28:58 2010  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* lib/delegate: Delegator: combine (public|protected) methods with
Index: ruby_1_9_2/test/ruby/test_beginendblock.rb
===================================================================
--- ruby_1_9_2/test/ruby/test_beginendblock.rb	(revision 28101)
+++ ruby_1_9_2/test/ruby/test_beginendblock.rb	(revision 28102)
@@ -55,6 +55,7 @@
     errout = Tempfile.new(self.class.name)
 
     launcher << <<EOF
+# -*- coding: #{ruby.encoding.name} -*-
 errout = ARGV.shift
 STDERR.reopen(File.open(errout, "w"))
 STDERR.sync = true
Index: ruby_1_9_2/file.c
===================================================================
--- ruby_1_9_2/file.c	(revision 28101)
+++ ruby_1_9_2/file.c	(revision 28102)
@@ -2896,7 +2896,7 @@
 		xfree(dir);
 		rb_enc_associate_index(result, rb_filesystem_encindex());
 	    }
-	    else rb_enc_copy(result, fname);
+	    else rb_enc_check(result, fname);
 	    p = chompdirsep(skiproot(buf));
 	    s += 2;
 	}
@@ -2906,7 +2906,7 @@
 	if (!NIL_P(dname)) {
 	    file_expand_path(dname, Qnil, abs_mode, result);
 	    BUFINIT();
-	    rb_enc_copy(result, fname);
+	    rb_enc_check(result, fname);
 	}
 	else {
 	    char *dir = my_getcwd();

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

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