Skip to content

Commit

Permalink
Dir.home should always use the user database, not the HOME variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Nov 14, 2018
1 parent c620b94 commit 0182f0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/ruby/core/dir/home_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
end

platform_is_not :windows do
it "returns the named user's home directory as a string if called with an argument" do
Dir.home(ENV['USER']).should == ENV['HOME']
it "returns the named user's home directory, from the user database, as a string if called with an argument" do
Dir.home(ENV['USER']).should == `echo ~#{ENV['USER']}`.chomp
end
end

Expand Down
1 change: 1 addition & 0 deletions spec/tags/core/dir/home_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
slow:Dir.home returns the named user's home directory, from the user database, as a string if called with an argument

0 comments on commit 0182f0b

Please sign in to comment.