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

ruby-changes:15405

From: nobu <ko1@a...>
Date: Sun, 11 Apr 2010 11:29:10 +0900 (JST)
Subject: [ruby-changes:15405] Ruby:r27298 (ruby_1_8): * ruby.c (ruby_init_loadpath): fix for the length of mangled path.

nobu	2010-04-11 11:28:59 +0900 (Sun, 11 Apr 2010)

  New Revision: 27298

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

  Log:
    * ruby.c (ruby_init_loadpath): fix for the length of mangled path.
      [ruby-core:29398]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ruby.c
    branches/ruby_1_8/version.h

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 27297)
+++ ruby_1_8/ChangeLog	(revision 27298)
@@ -1,3 +1,8 @@
+Sun Apr 11 11:28:53 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* ruby.c (ruby_init_loadpath): fix for the length of mangled path.
+	  [ruby-core:29398]
+
 Thu Apr  8 14:32:48 2010  URABE Shyouhei  <shyouhei@r...>
 
 	* configure.in: --disable-install-doc should prohibit doxygen.
Index: ruby_1_8/version.h
===================================================================
--- ruby_1_8/version.h	(revision 27297)
+++ ruby_1_8/version.h	(revision 27298)
@@ -1,7 +1,7 @@
 #define RUBY_VERSION "1.8.8"
-#define RUBY_RELEASE_DATE "2010-04-08"
+#define RUBY_RELEASE_DATE "2010-04-11"
 #define RUBY_VERSION_CODE 188
-#define RUBY_RELEASE_CODE 20100408
+#define RUBY_RELEASE_CODE 20100411
 #define RUBY_PATCHLEVEL -1
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 8
 #define RUBY_RELEASE_YEAR 2010
 #define RUBY_RELEASE_MONTH 4
-#define RUBY_RELEASE_DAY 8
+#define RUBY_RELEASE_DAY 11
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8/ruby.c
===================================================================
--- ruby_1_8/ruby.c	(revision 27297)
+++ ruby_1_8/ruby.c	(revision 27298)
@@ -306,13 +306,13 @@
     baselen = p - libpath;
     rest = FILENAME_MAX - baselen;
 
-#define RUBY_RELATIVE(path) (strncpy(p, (path), rest), libpath)
+#define RUBY_RELATIVE(path, len) (strncpy(p, (path), rest), rubylib_mangled_path(libpath, baselen+(len)))
 #else
     static const char exec_prefix[] = RUBY_EXEC_PREFIX;
-#define RUBY_RELATIVE(path) (path)
-#define PREFIX_PATH() rubylib_mangled_path(exec_prefix, sizeof(exec_prefix)-1)
+#define RUBY_RELATIVE(path, len) rubylib_mangled_path(path, len)
+#define PREFIX_PATH() RUBY_RELATIVE(exec_prefix, sizeof(exec_prefix)-1)
 #endif
-#define incpush(path, len) rb_ary_push(rb_load_path, rubylib_mangled_path(path, len))
+#define incpush(path) rb_ary_push(rb_load_path, (path))
 
     if (rb_safe_level() == 0) {
 	ruby_incpush(getenv("RUBYLIB"));
@@ -320,12 +320,12 @@
 
     while (*paths) {
 	size_t len = strlen(paths);
-	incpush(RUBY_RELATIVE(paths), len);
+	incpush(RUBY_RELATIVE(paths, len));
 	paths += len + 1;
     }
 
     if (rb_safe_level() == 0) {
-	incpush(".", 1);
+	incpush(rb_str_new2("."));
     }
 
     rb_const_set(rb_cObject, rb_intern("TMP_RUBY_PREFIX"), rb_obj_freeze(PREFIX_PATH()));

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

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