# File lib/bundler/vendor/thor/shell/basic.rb, line 230 def truncate(string, width) if string.length <= width string else ( string[0, width-3] || "" ) + "..." end end