branch: elpa/inf-ruby
commit 4d820954241988b4506e067fa9fdf6d574876e2c
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
inf-ruby-console-gem: Only try to load Ruby files
Fixes dgutov/robe#89.
---
inf-ruby.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index 8d4db9c013..deb57692f5 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -720,7 +720,8 @@ Gemfile, it should use the `gemspec' instruction."
(setq args (concat " -r " feature))
;; Let's require all non-directory files under lib, instead.
(dolist (item (directory-files "lib"))
- (unless (file-directory-p (format "lib/%s" item))
+ (when (and (not (file-directory-p (format "lib/%s" item)))
+ (string-match-p "\\.rb\\'" item))
(push item files)))
(setq args
(mapconcat