Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

The require completion would fail if there was an entry in $LOAD_PATH…

… which did not exist

git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle@8979 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commit d526060cd90c30ba688a8acff8608b33fbf6b49d 1 parent 01f194d
ciaran authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 Preferences/Completion: require strings.tmPreferences
View
5 Preferences/Completion: require strings.tmPreferences
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
@@ -12,7 +12,8 @@
<string>#!/usr/bin/env ruby
ptrn = /^#{Regexp.escape ENV["TM_CURRENT_WORD"].to_s}[^.]+\..+/
puts( $LOAD_PATH.inject([]) do |res, path|
- res + Dir.new(path).grep(ptrn) { |file| file[/^[^.]+/] }
+ res &lt;&lt; Dir.new(path).grep(ptrn) { |file| file[/^[^.]+/] } if File.exists?(path)
+ res
end.sort.uniq )</string>
</dict>
<key>uuid</key>
Please sign in to comment.
Something went wrong with that request. Please try again.