aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-02-21 15:12:33 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-02-21 15:12:33 +0000
commitee50c126cfb72b062f7c0506fd08425a5b42ca80 (patch)
treed81ee418827fc0eee5c8165ea1098a7de1566a0a
parentbd6ed3ba8274e80d8d78bd55c942159bd6149465 (diff)
downloadpaludis-ee50c126cfb72b062f7c0506fd08425a5b42ca80.tar.gz
paludis-ee50c126cfb72b062f7c0506fd08425a5b42ca80.tar.xz
Bring ruby up to date.
-rw-r--r--ruby/dep_list.cc8
-rw-r--r--ruby/dep_list_TEST.rb9
2 files changed, 9 insertions, 8 deletions
diff --git a/ruby/dep_list.cc b/ruby/dep_list.cc
index da30531..1359714 100644
--- a/ruby/dep_list.cc
+++ b/ruby/dep_list.cc
@@ -1035,7 +1035,6 @@ namespace
}
}
-#if CIARANM_DISABLED_THIS
/*
* call-seq:
* destinations -> Array
@@ -1048,12 +1047,11 @@ namespace
DepListEntry * p;
Data_Get_Struct(self, DepListEntry, p);
VALUE result = rb_ary_new();
- for (DestinationsCollection::Iterator i(p->destinations->begin()),
+ for (SortedCollection<DepListEntryDestination>::Iterator i(p->destinations->begin()),
i_end(p->destinations->end()) ; i != i_end ; ++i)
- rb_ary_push(result, repository_to_value(*i));
+ rb_ary_push(result, repository_to_value(i->destination));
return result;
}
-#endif
VALUE
dep_list_override_masks_init(VALUE self)
@@ -1504,9 +1502,7 @@ namespace
rb_define_method(c_dep_list_entry, "metadata", RUBY_FUNC_CAST(&dep_list_entry_metadata), 0);
rb_define_method(c_dep_list_entry, "state", RUBY_FUNC_CAST(&dep_list_entry_state), 0);
rb_define_method(c_dep_list_entry, "tags", RUBY_FUNC_CAST(&dep_list_entry_tags), 0);
-#if CIARANM_DISABLED_THIS
rb_define_method(c_dep_list_entry, "destinations", RUBY_FUNC_CAST(&dep_list_entry_destinations), 0);
-#endif
/*
* Document-class: DepListOverrideMasks
diff --git a/ruby/dep_list_TEST.rb b/ruby/dep_list_TEST.rb
index afa98a0..81fe297 100644
--- a/ruby/dep_list_TEST.rb
+++ b/ruby/dep_list_TEST.rb
@@ -248,10 +248,15 @@ module Paludis
dep_list_entry = dle
{
:package => PackageDatabaseEntry, :metadata => VersionMetadata,
- :state=> Integer, :tags => Array
+ :state=> Integer, :tags => [String], :destinations => [Repository]
}.each_pair do |method, returns|
assert_respond_to dep_list_entry, method
- assert_kind_of returns, dep_list_entry.send(method)
+ if returns.kind_of? Array
+ assert_kind_of Array, dep_list_entry.send(method)
+ dep_list_entry.send(method).each {|x| assert_kind_of returns.first, x}
+ else
+ assert_kind_of returns, dep_list_entry.send(method)
+ end
end
end
end