ruby-changes:6690
From: nobu <ko1@a...>
Date: Fri, 25 Jul 2008 15:06:11 +0900 (JST)
Subject: [ruby-changes:6690] Ruby:r18205 (mvm): * include/ruby/io.h (ruby_absolute_path_p): published.
nobu 2008-07-25 15:05:55 +0900 (Fri, 25 Jul 2008) New Revision: 18205 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18205 Log: * include/ruby/io.h (ruby_absolute_path_p): published. * io.c (rb_sysopen_prepare): fix for non-openat platforms. Modified files: branches/mvm/ChangeLog branches/mvm/file.c branches/mvm/include/ruby/io.h branches/mvm/io.c Index: mvm/include/ruby/io.h =================================================================== --- mvm/include/ruby/io.h (revision 18204) +++ mvm/include/ruby/io.h (revision 18205) @@ -122,6 +122,8 @@ DEPRECATED(long rb_io_fwrite(const char *, long, FILE *)); DEPRECATED(int rb_read_pending(FILE*)); +int ruby_absolute_path_p(const char*); + #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ Index: mvm/ChangeLog =================================================================== --- mvm/ChangeLog (revision 18204) +++ mvm/ChangeLog (revision 18205) @@ -1,3 +1,9 @@ +Fri Jul 25 15:05:42 2008 Nobuyoshi Nakada <nobu@r...> + + * include/ruby/io.h (ruby_absolute_path_p): published. + + * io.c (rb_sysopen_prepare): fix for non-openat platforms. + Tue Jul 22 21:07:12 2008 Nobuyoshi Nakada <nobu@r...> * dir.c (get_cwd_fd): returns int. Index: mvm/io.c =================================================================== --- mvm/io.c (revision 18204) +++ mvm/io.c (revision 18205) @@ -3429,11 +3429,11 @@ data->base = GET_THREAD()->cwd.fd; #else if (ruby_absolute_path_p(fname)) { - data->base = Qnil; + data->fullpath = Qnil; } else { - data->base = rb_file_expand_path(rb_str_new2(fname), Qnil); - fname = RSTRING_PTR(data->base); + data->fullpath = rb_file_expand_path(rb_str_new2(fname), Qnil); + fname = RSTRING_PTR(data->fullpath); } #endif data->fname = fname; Index: mvm/file.c =================================================================== --- mvm/file.c (revision 18204) +++ mvm/file.c (revision 18205) @@ -2624,7 +2624,6 @@ rb_enc_associate(result, extenc)) #define is_absolute_path(path) ruby_absolute_path_p(path) -int ruby_absolute_path_p(const char*); static VALUE file_expand_path(VALUE fname, VALUE dname, VALUE result) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/