diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-11 02:28:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-11 02:28:59 +0000 |
commit | b068def1ab1859b7a8e9dff255cf24568e356cb8 (patch) | |
tree | 55816d0aa5de489bad9c55e4d833d1ca4c1c801f | |
parent | ef9528cefe715036f1c7d1ef294417379b72e41d (diff) |
* ruby.c (ruby_init_loadpath): fix for the length of mangled path.
[ruby-core:29398]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ruby.c | 12 | ||||
-rw-r--r-- | version.h | 6 |
3 files changed, 14 insertions, 9 deletions
@@ -1,3 +1,8 @@ +Sun Apr 11 11:28:53 2010 Nobuyoshi Nakada <[email protected]> + + * ruby.c (ruby_init_loadpath): fix for the length of mangled path. + [ruby-core:29398] + Thu Apr 8 14:32:48 2010 URABE Shyouhei <[email protected]> * configure.in: --disable-install-doc should prohibit doxygen. @@ -306,13 +306,13 @@ ruby_init_loadpath() 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 @@ ruby_init_loadpath() 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())); @@ -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[]; |