Skip to content

Commit

Permalink
Fix file spec when HOME ends with /
Browse files Browse the repository at this point in the history
  • Loading branch information
RX14 authored and Ary Borenszweig committed Dec 13, 2016
1 parent 51e2e76 commit d7de3a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/std/file_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ private def rootdir
end

private def home
ENV["HOME"]
home = ENV["HOME"]
return home if home == "/"

home.chomp('/')
end

private def it_raises_on_null_byte(operation, &block)
Expand Down

0 comments on commit d7de3a1

Please sign in to comment.