Project

General

Profile

Backport #8069

Backport r39697

Added by luislavena (Luis Lavena) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:53283]

Description

Hello,

Please backport r39697 as it fixes a bug reported in #8034

Thank you.


Files

backport-8034-ruby_2_0_0.diff (7.04 KB) backport-8034-ruby_2_0_0.diff luislavena (Luis Lavena), 03/14/2013 01:18 PM

Related issues

Related to Ruby master - Bug #8034: File.expand_path('something', '~') do not include home pathClosed03/06/2013Actions

Associated revisions

Revision a7256d7a
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

merge revision(s) 39697,39701,39716,39740,39751: [Backport #8069]

    * win32/file.c (rb_file_expand_path_internal):  Expand home directory when
      used as second parameter (dir_string).  [ruby-core:53168] [Bug #8034]

    * test/ruby/test_file_exhaustive.rb: add test to verify.

    * win32/file.c (get_user_from_path):  add internal function that retrieves
      username from supplied path (refactored).

    * win32/file.c (rb_file_expand_path_internal):  refactor expansion of user
      home to use get_user_from_path and cover dir_string corner cases.
      [ruby-core:53168] [Bug #8034]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40249
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

merge revision(s) 39697,39701,39716,39740,39751: [Backport #8069]

* win32/file.c (rb_file_expand_path_internal):  Expand home directory when
  used as second parameter (dir_string).  [ruby-core:53168] [Bug #8034]

* test/ruby/test_file_exhaustive.rb: add test to verify.

* win32/file.c (get_user_from_path):  add internal function that retrieves
  username from supplied path (refactored).

* win32/file.c (rb_file_expand_path_internal):  refactor expansion of user
  home to use get_user_from_path and cover dir_string corner cases.
  [ruby-core:53168] [Bug #8034]

History

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

Thank you Luis.
I'll backport it with r39701.

Updated by luislavena (Luis Lavena) over 6 years ago

Hello,

As pointed out by nobu, I was missing some tests.

The complete list of revisions to be backported are:

r39697
r39701
r39716
r39740
r39751

For simplicity I have attached a patch that includes both code and ChangeLog modifications for ruby_2_0_0 branch.

I was not able to test it due configure errors:

http://ci.rubyinstaller.org/job/ruby-2_0_0-x86-build/35/console
http://ci.rubyinstaller.org/job/ruby-2_0_0-x64-build/35/console

But a quick look to the code itself didn't show any potential problem.

Thank you.

#3

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r40249.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 39697,39701,39716,39740,39751: [Backport #8069]

* win32/file.c (rb_file_expand_path_internal):  Expand home directory when
  used as second parameter (dir_string).  [ruby-core:53168] [Bug #8034]

* test/ruby/test_file_exhaustive.rb: add test to verify.

* win32/file.c (get_user_from_path):  add internal function that retrieves
  username from supplied path (refactored).

* win32/file.c (rb_file_expand_path_internal):  refactor expansion of user
  home to use get_user_from_path and cover dir_string corner cases.
  [ruby-core:53168] [Bug #8034]

Also available in: Atom PDF