summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/dependency_command.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/dependency_command.rb8
1 files changed, 4 insertions, 4 deletions
@@ -77,7 +77,7 @@ use with other commands.
name_matches = name_pattern ? name_pattern =~ spec.name : true
version_matches = requirement.satisfied_by?(spec.version)
- name_matches and version_matches
}.map(&:to_spec)
end
@@ -133,7 +133,7 @@ use with other commands.
end
def ensure_local_only_reverse_dependencies # :nodoc:
- if options[:reverse_dependencies] and remote? and not local?
alert_error "Only reverse dependencies for local gems are supported."
terminate_interaction 1
end
@@ -182,7 +182,7 @@ use with other commands.
sp.dependencies.each do |dep|
dep = Gem::Dependency.new(*dep) unless Gem::Dependency === dep
- if spec.name == dep.name and
dep.requirement.satisfied_by?(spec.version)
result << [sp.full_name, dep]
end
@@ -197,7 +197,7 @@ use with other commands.
def name_pattern(args)
return if args.empty?
- if args.length == 1 and args.first =~ /\A(.*)(i)?\z/m
flags = $2 ? Regexp::IGNORECASE : nil
Regexp.new $1, flags
else