Permalink
Browse files

Merge pull request #1 from voxik/master

A few fixes
  • Loading branch information...
2 parents 4fe94a6 + 5bc4508 commit 82e34806cfaeee223e059883f5b0152a5317ad0c @bkabrda committed Jan 8, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 rubygems/operating_system.rb
@@ -3,12 +3,13 @@ class << self
##
# Returns full path of previous but one directory of dir in path
- # E.g. for '/usr/share/jruby', 'jruby', it returns '/usr'
+ # E.g. for '/usr/share/ruby', 'ruby', it returns '/usr'
def previous_but_one_dir_to(path, dir)
split_path = path.split(File::SEPARATOR)
File.join(split_path.take_while { |one_dir| one_dir !~ /^#{dir}$/ }[0..-2])
end
+ private :previous_but_one_dir_to
##
# Default gems locations allowed on FHS system (/usr, /usr/share).

0 comments on commit 82e3480

Please sign in to comment.