aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-04 23:30:07 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-04 23:30:07 +0100
commit27d57d9ed2f2a24a86b91029638563cd8ccfabab (patch)
treecc8bd72c1be1741d3206735ca591bffac9c49d75 /ruby
parentb5280212886a3a31703600c12608c5a5a8be5555 (diff)
downloadpaludis-27d57d9ed2f2a24a86b91029638563cd8ccfabab.tar.gz
paludis-27d57d9ed2f2a24a86b91029638563cd8ccfabab.tar.xz
Contents is not a MetadataKey
Diffstat (limited to 'ruby')
-rw-r--r--ruby/metadata_key.cc40
-rw-r--r--ruby/package_id_TEST.rb3
2 files changed, 2 insertions, 41 deletions
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index 3ae309715..b2bc74089 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -40,7 +40,6 @@ namespace
static VALUE c_metadata_slot_key;
static VALUE c_metadata_size_key;
static VALUE c_metadata_time_key;
- static VALUE c_metadata_contents_key;
static VALUE c_metadata_choices_key;
static VALUE c_metadata_keyword_name_set_key;
static VALUE c_metadata_string_set_key;
@@ -139,12 +138,6 @@ namespace
new std::shared_ptr<const MetadataKey>(mm));
}
- void visit(const MetadataValueKey<std::shared_ptr<const Contents> > &)
- {
- value = Data_Wrap_Struct(c_metadata_contents_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
- new std::shared_ptr<const MetadataKey>(mm));
- }
-
void visit(const MetadataValueKey<std::shared_ptr<const Choices> > &)
{
value = Data_Wrap_Struct(c_metadata_choices_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
@@ -378,29 +371,6 @@ namespace
/*
* call-seq:
- * parse_value -> Contents
- *
- * Our Value.
- * */
- VALUE
- metadata_contents_key_value(VALUE self)
- {
- try
- {
- std::shared_ptr<const MetadataKey> * self_ptr;
- Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- if (std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Contents> > >(*self_ptr)->parse_value())
- return contents_to_value(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Contents> > >(*self_ptr)->parse_value());
- return Qnil;
- }
- catch (const std::exception & e)
- {
- exception_to_ruby_exception(e);
- }
- }
-
- /*
- * call-seq:
* parse_value -> Choices
*
* Our Value.
@@ -689,17 +659,9 @@ namespace
rb_define_method(c_metadata_time_key, "parse_value", RUBY_FUNC_CAST(&metadata_time_key_value), 0);
/*
- * Document-class: Paludis::MetadataContentsKey
- *
- * Metadata class for Contents.
- */
- c_metadata_contents_key = rb_define_class_under(paludis_module(), "MetadataContentsKey", c_metadata_key);
- rb_define_method(c_metadata_contents_key, "parse_value", RUBY_FUNC_CAST(&metadata_contents_key_value), 0);
-
- /*
* Document-class: Paludis::MetadataChoicesKey
*
- * Metadata class for Contents.
+ * Metadata class for Choices.
*/
c_metadata_choices_key = rb_define_class_under(paludis_module(), "MetadataChoicesKey", c_metadata_key);
rb_define_method(c_metadata_choices_key, "parse_value", RUBY_FUNC_CAST(&metadata_choices_key_value), 0);
diff --git a/ruby/package_id_TEST.rb b/ruby/package_id_TEST.rb
index cdd0c5907..2ef7ab625 100644
--- a/ruby/package_id_TEST.rb
+++ b/ruby/package_id_TEST.rb
@@ -51,8 +51,7 @@ module Paludis
include TestStuff
def classes
- [MetadataStringKey, MetadataContentsKey, MetadataTimeKey, MetadataKeywordNameSetKey,
- MetadataStringSetKey]
+ [MetadataStringKey, MetadataTimeKey, MetadataKeywordNameSetKey, MetadataStringSetKey]
end
def all_classes