aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-05-23 17:51:59 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-05-23 17:51:59 +0000
commit213188b0b062b770a36a12c3b84b5fd9735b5669 (patch)
treeb5b9e75034240b191506b80c61411d79f3f5264d
parent0e6b884dc0856c334880f88ebcedd6b50849275a (diff)
downloadpaludis-213188b0b062b770a36a12c3b84b5fd9735b5669.tar.gz
paludis-213188b0b062b770a36a12c3b84b5fd9735b5669.tar.xz
(ruby) Fix accept_unstable.
-rw-r--r--ruby/environment.cc2
-rw-r--r--ruby/environment_TEST.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/ruby/environment.cc b/ruby/environment.cc
index 8675225..008adfe 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -529,7 +529,7 @@ namespace
rb_define_method(c_no_config_environment, "initialize", RUBY_FUNC_CAST(&no_config_environment_init), -1);
rb_define_method(c_no_config_environment, "main_repository", RUBY_FUNC_CAST(&no_config_environment_main_repository), 0);
rb_define_method(c_no_config_environment, "master_repository", RUBY_FUNC_CAST(&no_config_environment_master_repository), 0);
- rb_define_method(c_no_config_environment, "accept_unstable=", RUBY_FUNC_CAST(&no_config_environment_set_accept_unstable), 0);
+ rb_define_method(c_no_config_environment, "accept_unstable=", RUBY_FUNC_CAST(&no_config_environment_set_accept_unstable), 1);
/*
* Document-class: Paludis::AdaptedEnvironment
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index 49e7954..e5d9b30 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -413,6 +413,10 @@ module Paludis
def test_set_accept_unstable
assert_respond_to env, :accept_unstable=
+ assert_nothing_raised do
+ env.accept_unstable=true
+ env.accept_unstable=false
+ end
end
end
end