summaryrefslogtreecommitdiff
path: root/src/dumm/ext
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-08-25 15:37:26 +0200
committerYves-Alexis Perez <corsac@debian.org>2013-08-25 15:37:26 +0200
commit6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349 (patch)
tree009fc492961e13860d2a4bc2de8caf2bbe2975e7 /src/dumm/ext
parentc83921a2b566aa9d55d8ccc7258f04fca6292ee6 (diff)
downloadvyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.tar.gz
vyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.zip
Imported Upstream version 5.1.0
Diffstat (limited to 'src/dumm/ext')
-rw-r--r--src/dumm/ext/dumm.c1
-rw-r--r--src/dumm/ext/lib/dumm.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/dumm/ext/dumm.c b/src/dumm/ext/dumm.c
index 603fac088..5acda3a9c 100644
--- a/src/dumm/ext/dumm.c
+++ b/src/dumm/ext/dumm.c
@@ -740,6 +740,7 @@ static VALUE template_each(int argc, VALUE *argv, VALUE class)
static void template_init()
{
rbc_template = rb_define_class_under(rbm_dumm , "Template", rb_cObject);
+ rb_include_module(rb_class_of(rbc_template), rb_mEnumerable);
rb_define_singleton_method(rbc_template, "load", template_load, 1);
rb_define_singleton_method(rbc_template, "unload", template_unload, 0);
diff --git a/src/dumm/ext/lib/dumm.rb b/src/dumm/ext/lib/dumm.rb
index bb60aad8f..959ec87df 100644
--- a/src/dumm/ext/lib/dumm.rb
+++ b/src/dumm/ext/lib/dumm.rb
@@ -34,8 +34,9 @@ module Dumm
if name
Template.load name
else
- Template.each {|t| puts t }
+ Template.sort.each {|t| puts t }
end
+ return Dumm
end
# unload template/overlays, reset all guests and delete bridges