Permalink
Browse files

reject empty paths

  • Loading branch information...
1 parent e10c601 commit 5c91e6b916702c50bd8a4c39a458d74d49a3fafd @swistaczek committed Mar 30, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/network_manager/modem.rb
  2. +1 −1 ruby-network-manager.gemspec
@@ -84,7 +84,7 @@ def scan
class << self
def fetch(paths_array, opts = {})
devices = []
- paths_array.each do |path|
+ paths_array.compact.reject {|x| x && x.size <= 0 }.each do |path|
devices << self.new(opts.merge({bus_path: path}) unless path.nil?
end
devices
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = "ruby-network-manager"
- s.version = "0.0.0"
+ s.version = "0.1.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ernest Bursa"]

0 comments on commit 5c91e6b

Please sign in to comment.