lib/composer/repository/writeable_hash_repository.rb in php-composer-0.4.5 vs lib/composer/repository/writeable_hash_repository.rb in php-composer-1.0.0.pre.alpha11

- old
+ new

@@ -16,11 +16,11 @@ # PHP Authors: # Jordi Boggiano <j.boggiano@seld.be> # # Ruby Authors: # Ioannis Kappas <ikappas@devworks.gr> - class WritableHashRepository < Composer::Repository::HashRepository + class WritableHashRepository < ::Composer::Repository::HashRepository def initialize(packages = []) super end @@ -37,24 +37,24 @@ # get at most one package of each name, preferring non-aliased ones packages_by_name = {} packages_uncanonicalized.each do |package| if !packages_by_name.key?(package.name) || - packages_by_name[package.name].instance_of?(Composer::Package::AliasPackage) + packages_by_name[package.name].instance_of?(::Composer::Package::AliasPackage) packages_by_name[package.name] = package end end # unfold aliased packages results = [] - packages_by_name.each do |name, package| - while package.instance_of?(Composer::Package::AliasPackage) + packages_by_name.each do |_name, package| + while package.instance_of?(::Composer::Package::AliasPackage) package = package.alias_of end results.push(package) end results end end end -end \ No newline at end of file +end