diff --git a/ChangeLog b/ChangeLog index 869bccfe50..434f1da52c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Apr 12 03:12:16 2008 Nobuyoshi Nakada + + * file.c (rb_file_s_basename, rb_file_s_dirname, rb_file_s_extname): + copy encoding. + Fri Apr 11 17:35:06 2008 Yukihiro Matsumoto * enum.c (count_i): modified to shut warning up. diff --git a/file.c b/file.c index 1d24b42017..c0ffa766db 100644 --- a/file.c +++ b/file.c @@ -2880,6 +2880,7 @@ rb_file_s_basename(int argc, VALUE *argv) } } basename = rb_str_new(p, f); + rb_enc_copy(basename, fname); OBJ_INFECT(basename, fname); return basename; } @@ -2931,6 +2932,7 @@ rb_file_s_dirname(VALUE klass, VALUE fname) if (has_drive_letter(name) && root == name + 2 && p - name == 2) rb_str_cat(dirname, ".", 1); #endif + rb_enc_copy(dirname, fname); OBJ_INFECT(dirname, fname); return dirname; } @@ -2967,6 +2969,7 @@ rb_file_s_extname(VALUE klass, VALUE fname) if (!e || e == p || !e[1]) /* no dot, or the only dot is first or end? */ return rb_str_new(0, 0); extname = rb_str_new(e, chompdirsep(e) - e); /* keep the dot, too! */ + rb_enc_copy(extname, fname); OBJ_INFECT(extname, fname); return extname; } diff --git a/version.h b/version.h index c6e9b9f6d1..507b05aa6e 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-04-11" +#define RUBY_RELEASE_DATE "2008-04-12" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20080411 +#define RUBY_RELEASE_CODE 20080412 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 11 +#define RUBY_RELEASE_DAY 12 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];