aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2008-01-19 22:01:49 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2008-01-19 22:01:49 +0000
commit03258d6753061be2a6611764b50c96ed0eee6198 (patch)
tree10dff66efa2094bbcbf7a258ed8abf7e9d33fa7b
parentb3966cea888c1bff7a945cb86c7c886c8a7174fa (diff)
downloadpaludis-03258d6753061be2a6611764b50c96ed0eee6198.tar.gz
paludis-03258d6753061be2a6611764b50c96ed0eee6198.tar.xz
(ruby) PackageDepSpec.package should return a QualifiedPackageName.
-rw-r--r--ruby/dep_spec.cc4
-rw-r--r--ruby/dep_spec_TEST.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index ef6c4b4..9c7e573 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -592,7 +592,7 @@ namespace
/*
* call-seq:
- * package -> String or Nil
+ * package -> QualifiedPackageName or Nil
*
* Fetch the package name.
*/
@@ -603,7 +603,7 @@ namespace
Data_Get_Struct(self, tr1::shared_ptr<WrappedSpecBase>, ptr);
if (0 == tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr())
return Qnil;
- return rb_str_new2(stringify(*tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr()).c_str());
+ return qualified_package_name_to_value(*tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr());
}
/*
diff --git a/ruby/dep_spec_TEST.rb b/ruby/dep_spec_TEST.rb
index 9447358..410cd8a 100644
--- a/ruby/dep_spec_TEST.rb
+++ b/ruby/dep_spec_TEST.rb
@@ -92,13 +92,13 @@ module Paludis
end
def test_package
- assert_equal "foo/bar", pda.package
+ assert_equal QualifiedPackageName.new("foo/bar"), pda.package
assert_nil pdb.package
end
def test_repository
assert_equal "testrepo", pda.repository
- assert_nil pdb.package
+ assert_nil pdb.repository
end
def test_package_name_part