aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Stephen P. Bennett <spb@exherbo.org> 2006-10-30 22:41:25 +0000
committerAvatar Stephen P. Bennett <spb@exherbo.org> 2006-10-30 22:41:25 +0000
commit07a5083d7e88a422a615d31681dba9eee93c648a (patch)
tree6bfc7de67f432d01fef48f8cc4a35c3a10e974d9
parent67f433b8d1043d4d39b4e8208c5a86faa768e7b5 (diff)
downloadpaludis-07a5083d7e88a422a615d31681dba9eee93c648a.tar.gz
paludis-07a5083d7e88a422a615d31681dba9eee93c648a.tar.xz
master_class -> paludis_module. By Richard Brown.
-rw-r--r--ruby/dep_atom.cc18
-rw-r--r--ruby/dep_atom_TEST.rb2
-rw-r--r--ruby/environment.cc8
-rw-r--r--ruby/environment_TEST.rb2
-rw-r--r--ruby/log.cc4
-rw-r--r--ruby/log_TEST.rb2
-rw-r--r--ruby/mask_reasons.cc2
-rw-r--r--ruby/mask_reasons_TEST.rb2
-rw-r--r--ruby/package_database.cc4
-rw-r--r--ruby/package_database_TEST.rb2
-rw-r--r--ruby/package_database_entry.cc2
-rw-r--r--ruby/package_database_entry_TEST.rb2
-rw-r--r--ruby/paludis_ruby.cc32
-rw-r--r--ruby/paludis_ruby.hh2
-rw-r--r--ruby/portage_dep_parser.cc2
-rw-r--r--ruby/portage_dep_parser_TEST.rb2
-rw-r--r--ruby/repository.cc6
-rw-r--r--ruby/repository_TEST.rb2
-rw-r--r--ruby/version_metadata.cc2
-rw-r--r--ruby/version_metadata_TEST.rb2
-rw-r--r--ruby/version_spec.cc2
-rw-r--r--ruby/version_spec_TEST.rb2
22 files changed, 52 insertions, 52 deletions
diff --git a/ruby/dep_atom.cc b/ruby/dep_atom.cc
index b0ea8dc..d74dda1 100644
--- a/ruby/dep_atom.cc
+++ b/ruby/dep_atom.cc
@@ -152,39 +152,39 @@ namespace
void do_register_dep_atom()
{
- c_dep_atom = rb_define_class_under(master_class(), "DepAtom", rb_cObject);
+ c_dep_atom = rb_define_class_under(paludis_module(), "DepAtom", rb_cObject);
rb_funcall(c_dep_atom, rb_intern("private_class_method"), 1, rb_str_new2("new"));
- c_composite_dep_atom = rb_define_class_under(master_class(), "CompositeDepAtom", c_dep_atom);
+ c_composite_dep_atom = rb_define_class_under(paludis_module(), "CompositeDepAtom", c_dep_atom);
rb_funcall(c_composite_dep_atom, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_composite_dep_atom, "each", RUBY_FUNC_CAST(&composite_dep_atom_each), 0);
rb_include_module(c_composite_dep_atom, rb_mEnumerable);
- c_all_dep_atom = rb_define_class_under(master_class(), "AllDepAtom", c_composite_dep_atom);
+ c_all_dep_atom = rb_define_class_under(paludis_module(), "AllDepAtom", c_composite_dep_atom);
rb_funcall(c_all_dep_atom, rb_intern("private_class_method"), 1, rb_str_new2("new"));
- c_any_dep_atom = rb_define_class_under(master_class(), "AnyDepAtom", c_composite_dep_atom);
+ c_any_dep_atom = rb_define_class_under(paludis_module(), "AnyDepAtom", c_composite_dep_atom);
rb_funcall(c_any_dep_atom, rb_intern("private_class_method"), 1, rb_str_new2("new"));
- c_use_dep_atom = rb_define_class_under(master_class(), "UseDepAtom", c_composite_dep_atom);
+ c_use_dep_atom = rb_define_class_under(paludis_module(), "UseDepAtom", c_composite_dep_atom);
rb_funcall(c_use_dep_atom, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_use_dep_atom, "flag", RUBY_FUNC_CAST(&use_dep_atom_flag), 0);
rb_define_method(c_use_dep_atom, "inverse?", RUBY_FUNC_CAST(&use_dep_atom_inverse), 0);
- c_string_dep_atom = rb_define_class_under(master_class(), "StringDepAtom", c_dep_atom);
+ c_string_dep_atom = rb_define_class_under(paludis_module(), "StringDepAtom", c_dep_atom);
rb_funcall(c_string_dep_atom, rb_intern("private_class_method"), 1, rb_str_new2("new"));
- c_package_dep_atom = rb_define_class_under(master_class(), "PackageDepAtom", c_string_dep_atom);
+ c_package_dep_atom = rb_define_class_under(paludis_module(), "PackageDepAtom", c_string_dep_atom);
rb_define_singleton_method(c_package_dep_atom, "new", RUBY_FUNC_CAST(&DepAtomThings<PackageDepAtom>::dep_atom_new_1), 1);
rb_define_method(c_package_dep_atom, "initialize", RUBY_FUNC_CAST(&dep_atom_init_1), 1);
rb_define_method(c_package_dep_atom, "to_s", RUBY_FUNC_CAST(&Common<PackageDepAtom::ConstPointer>::to_s_via_ptr), 0);
- c_plain_text_dep_atom = rb_define_class_under(master_class(), "PlainTextDepAtom", c_string_dep_atom);
+ c_plain_text_dep_atom = rb_define_class_under(paludis_module(), "PlainTextDepAtom", c_string_dep_atom);
rb_define_singleton_method(c_plain_text_dep_atom, "new", RUBY_FUNC_CAST(&DepAtomThings<PlainTextDepAtom>::dep_atom_new_1), 1);
rb_define_method(c_plain_text_dep_atom, "initialize", RUBY_FUNC_CAST(&dep_atom_init_1), 1);
rb_define_method(c_plain_text_dep_atom, "to_s", RUBY_FUNC_CAST(&Common<PlainTextDepAtom::ConstPointer>::to_s_via_ptr), 0);
- c_block_dep_atom = rb_define_class_under(master_class(), "BlockDepAtom", c_string_dep_atom);
+ c_block_dep_atom = rb_define_class_under(paludis_module(), "BlockDepAtom", c_string_dep_atom);
rb_define_singleton_method(c_block_dep_atom, "new", RUBY_FUNC_CAST(&block_dep_atom_new), 1);
rb_define_method(c_block_dep_atom, "initialize", RUBY_FUNC_CAST(&dep_atom_init_1), 1);
rb_define_method(c_block_dep_atom, "blocked_atom", RUBY_FUNC_CAST(&block_dep_atom_blocked_atom), 0);
diff --git a/ruby/dep_atom_TEST.rb b/ruby/dep_atom_TEST.rb
index d9de8b0..6655860 100644
--- a/ruby/dep_atom_TEST.rb
+++ b/ruby/dep_atom_TEST.rb
@@ -21,7 +21,7 @@
require 'test/unit'
require 'Paludis'
-class Paludis
+module Paludis
class TestCase_DepAtom < Test::Unit::TestCase
def test_create_error
assert_raise NoMethodError do
diff --git a/ruby/environment.cc b/ruby/environment.cc
index 943158a..cb90956 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -246,7 +246,7 @@ namespace
{
rb_require("singleton");
- c_environment = rb_define_class_under(master_class(), "Environment", rb_cObject);
+ c_environment = rb_define_class_under(paludis_module(), "Environment", rb_cObject);
rb_funcall(c_environment, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_environment, "query_use", RUBY_FUNC_CAST(&environment_query_use), -1);
rb_define_method(c_environment, "accept_keyword", RUBY_FUNC_CAST(&environment_accept_keyword), -1);
@@ -254,18 +254,18 @@ namespace
rb_define_method(c_environment, "mask_reasons", RUBY_FUNC_CAST(&environment_mask_reasons), 1);
rb_define_method(c_environment, "package_database", RUBY_FUNC_CAST(&environment_package_database), 0);
- c_default_environment = rb_define_class_under(master_class(), "DefaultEnvironment", c_environment);
+ c_default_environment = rb_define_class_under(paludis_module(), "DefaultEnvironment", c_environment);
rb_define_singleton_method(c_default_environment, "new", RUBY_FUNC_CAST(&default_environment_new), 0);
rb_funcall(rb_const_get(rb_cObject, rb_intern("Singleton")), rb_intern("included"), 1, c_default_environment);
- c_default_config = rb_define_class_under(master_class(), "DefaultConfig", rb_cObject);
+ c_default_config = rb_define_class_under(paludis_module(), "DefaultConfig", rb_cObject);
rb_funcall(c_default_config, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_singleton_method(c_default_config, "config_suffix",
RUBY_FUNC_CAST(&default_config_config_suffix), 0);
rb_define_singleton_method(c_default_config, "config_suffix=",
RUBY_FUNC_CAST(&default_config_config_suffix_set), 1);
- c_no_config_environment = rb_define_class_under(master_class(), "NoConfigEnvironment", c_environment);
+ c_no_config_environment = rb_define_class_under(paludis_module(), "NoConfigEnvironment", c_environment);
rb_define_singleton_method(c_no_config_environment, "new", RUBY_FUNC_CAST(&no_config_environment_new), 1);
rb_define_method(c_no_config_environment, "initialize", RUBY_FUNC_CAST(&no_config_environment_init), 1);
}
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index 545e4a8..f981830 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -25,7 +25,7 @@ require 'Paludis'
Paludis::Log.instance.log_level = Paludis::LogLevel::Warning
-class Paludis
+module Paludis
class TestCase_DefaultEnvironment < Test::Unit::TestCase
def test_instance
diff --git a/ruby/log.cc b/ruby/log.cc
index 0c50a3e..4461678 100644
--- a/ruby/log.cc
+++ b/ruby/log.cc
@@ -63,14 +63,14 @@ namespace
{
rb_require("singleton");
- c_log = rb_define_class_under(master_class(), "Log", rb_cObject);
+ c_log = rb_define_class_under(paludis_module(), "Log", rb_cObject);
rb_funcall(rb_const_get(rb_cObject, rb_intern("Singleton")), rb_intern("included"), 1, c_log);
rb_define_method(c_log, "log_level", RUBY_FUNC_CAST(&log_log_level), 0);
rb_define_method(c_log, "log_level=", RUBY_FUNC_CAST(&log_log_level_set), 1);
rb_define_method(c_log, "program_name=", RUBY_FUNC_CAST(&log_set_program_name), 1);
rb_define_method(c_log, "message", RUBY_FUNC_CAST(&log_message), 2);
- c_log_level = rb_define_class_under(master_class(), "LogLevel", rb_cObject);
+ c_log_level = rb_define_class_under(paludis_module(), "LogLevel", rb_cObject);
for (LogLevel l(static_cast<LogLevel>(0)), l_end(last_ll) ; l != l_end ;
l = static_cast<LogLevel>(static_cast<int>(l) + 1))
rb_define_const(c_log_level, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
diff --git a/ruby/log_TEST.rb b/ruby/log_TEST.rb
index 0657cbb..ed48d48 100644
--- a/ruby/log_TEST.rb
+++ b/ruby/log_TEST.rb
@@ -23,7 +23,7 @@ ENV["PALUDIS_HOME"] = Dir.getwd().to_s + "/default_environment_TEST_dir/home";
require 'test/unit'
require 'Paludis'
-class Paludis
+module Paludis
class TestCase_Log < Test::Unit::TestCase
def test_instance
assert_equal Log.instance.__id__, Log.instance.__id__
diff --git a/ruby/mask_reasons.cc b/ruby/mask_reasons.cc
index 993538b..7d647b6 100644
--- a/ruby/mask_reasons.cc
+++ b/ruby/mask_reasons.cc
@@ -78,7 +78,7 @@ namespace
void do_register_mask_reasons()
{
- c_mask_reasons = rb_define_class_under(master_class(), "MaskReasons", rb_cObject);
+ c_mask_reasons = rb_define_class_under(paludis_module(), "MaskReasons", rb_cObject);
rb_define_singleton_method(c_mask_reasons, "new", RUBY_FUNC_CAST(&mask_reasons_new), 0);
rb_define_method(c_mask_reasons, "initialize", RUBY_FUNC_CAST(&mask_reasons_init), 0);
rb_define_method(c_mask_reasons, "each", RUBY_FUNC_CAST(&mask_reasons_each), 0);
diff --git a/ruby/mask_reasons_TEST.rb b/ruby/mask_reasons_TEST.rb
index 93fc095..9be2b62 100644
--- a/ruby/mask_reasons_TEST.rb
+++ b/ruby/mask_reasons_TEST.rb
@@ -21,7 +21,7 @@
require 'test/unit'
require 'Paludis'
-class Paludis
+module Paludis
class TestCase_MaskReasons < Test::Unit::TestCase
def test_create
diff --git a/ruby/package_database.cc b/ruby/package_database.cc
index 3f828bb..4918a9d 100644
--- a/ruby/package_database.cc
+++ b/ruby/package_database.cc
@@ -145,7 +145,7 @@ namespace
void do_register_package_database()
{
- c_package_database = rb_define_class_under(master_class(), "PackageDatabase", rb_cObject);
+ c_package_database = rb_define_class_under(paludis_module(), "PackageDatabase", rb_cObject);
rb_funcall(c_package_database, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_package_database, "favourite_repository",
RUBY_FUNC_CAST(&package_database_favourite_repository), 0);
@@ -160,7 +160,7 @@ namespace
rb_define_method(c_package_database, "better_repository",
RUBY_FUNC_CAST(&package_database_better_repository), 2);
- c_package_database_install_state = rb_define_class_under(master_class(), "InstallState", rb_cObject);
+ c_package_database_install_state = rb_define_class_under(paludis_module(), "InstallState", rb_cObject);
for (InstallState l(static_cast<InstallState>(0)), l_end(last_install_state) ; l != l_end ;
l = static_cast<InstallState>(static_cast<int>(l) + 1))
rb_define_const(c_package_database_install_state, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
diff --git a/ruby/package_database_TEST.rb b/ruby/package_database_TEST.rb
index aca8cfd..df472da 100644
--- a/ruby/package_database_TEST.rb
+++ b/ruby/package_database_TEST.rb
@@ -25,7 +25,7 @@ require 'Paludis'
Paludis::Log.instance.log_level = Paludis::LogLevel::Warning
-class Paludis
+module Paludis
class TestCase_PackageDatabase < Test::Unit::TestCase
def test_no_create
assert_raise NoMethodError do
diff --git a/ruby/package_database_entry.cc b/ruby/package_database_entry.cc
index 941f61b..485b064 100644
--- a/ruby/package_database_entry.cc
+++ b/ruby/package_database_entry.cc
@@ -120,7 +120,7 @@ namespace
void do_register_package_database_entry()
{
- c_package_database_entry = rb_define_class_under(master_class(), "PackageDatabaseEntry", rb_cObject);
+ c_package_database_entry = rb_define_class_under(paludis_module(), "PackageDatabaseEntry", rb_cObject);
rb_define_singleton_method(c_package_database_entry, "new", RUBY_FUNC_CAST(&package_database_entry_new), 3);
rb_define_method(c_package_database_entry, "initialize", RUBY_FUNC_CAST(&package_database_entry_init), 3);
rb_define_method(c_package_database_entry, "<=>", RUBY_FUNC_CAST(&Common<PackageDatabaseEntry>::compare), 1);
diff --git a/ruby/package_database_entry_TEST.rb b/ruby/package_database_entry_TEST.rb
index 2b4cf53..22485bf 100644
--- a/ruby/package_database_entry_TEST.rb
+++ b/ruby/package_database_entry_TEST.rb
@@ -20,7 +20,7 @@
require 'test/unit'
require 'Paludis'
-class Paludis
+module Paludis
class TestCase_PackageDatabaseEntry < Test::Unit::TestCase
def test_create
v = PackageDatabaseEntry.new("foo/bar", VersionSpec.new("0"), "moo")
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
index 066bea6..ea6dc18 100644
--- a/ruby/paludis_ruby.cc
+++ b/ruby/paludis_ruby.cc
@@ -38,7 +38,7 @@ namespace paludis
namespace
{
- static VALUE c_master_class;
+ static VALUE c_paludis_module;
static VALUE c_name_error;
static VALUE c_bad_version_spec_error;
static VALUE c_package_dep_atom_error;
@@ -131,28 +131,28 @@ paludis::ruby::value_case_to_RubyCase(const std::string & s)
}
VALUE
-paludis::ruby::master_class()
+paludis::ruby::paludis_module()
{
- return c_master_class;
+ return c_paludis_module;
}
extern "C"
{
void Init_Paludis()
{
- c_master_class = rb_define_class("Paludis", rb_cObject);
- c_name_error = rb_define_class_under(c_master_class, "NameError", rb_eRuntimeError);
- c_bad_version_spec_error = rb_define_class_under(c_master_class, "BadVersionSpecError", c_name_error);
- c_package_dep_atom_error = rb_define_class_under(c_master_class, "PackageDepAtomError", rb_eRuntimeError);
- c_package_database_error = rb_define_class_under(c_master_class, "PackageDatabaseError", rb_eRuntimeError);
- c_package_database_lookup_error = rb_define_class_under(c_master_class, "PackageDatabaseLookupError", c_package_database_error);
- c_no_such_package_error = rb_define_class_under(c_master_class, "NoSuchPackageError", c_package_database_lookup_error);
- c_no_such_repository_error = rb_define_class_under(c_master_class, "NoSuchRepositoryError", c_package_database_lookup_error);
- c_dep_string_error = rb_define_class_under(c_master_class, "DepStringError", rb_eRuntimeError);
- c_dep_string_parse_error = rb_define_class_under(c_master_class, "DepStringParseError", c_dep_string_error);
- c_dep_string_nesting_error = rb_define_class_under(c_master_class, "DepStringNestingError", c_dep_string_parse_error);
-
- rb_define_const(c_master_class, "Version", rb_str_new2((stringify(PALUDIS_VERSION_MAJOR) + "."
+ c_paludis_module = rb_define_module("Paludis");
+ c_name_error = rb_define_class_under(c_paludis_module, "NameError", rb_eRuntimeError);
+ c_bad_version_spec_error = rb_define_class_under(c_paludis_module, "BadVersionSpecError", c_name_error);
+ c_package_dep_atom_error = rb_define_class_under(c_paludis_module, "PackageDepAtomError", rb_eRuntimeError);
+ c_package_database_error = rb_define_class_under(c_paludis_module, "PackageDatabaseError", rb_eRuntimeError);
+ c_package_database_lookup_error = rb_define_class_under(c_paludis_module, "PackageDatabaseLookupError", c_package_database_error);
+ c_no_such_package_error = rb_define_class_under(c_paludis_module, "NoSuchPackageError", c_package_database_lookup_error);
+ c_no_such_repository_error = rb_define_class_under(c_paludis_module, "NoSuchRepositoryError", c_package_database_lookup_error);
+ c_dep_string_error = rb_define_class_under(c_paludis_module, "DepStringError", rb_eRuntimeError);
+ c_dep_string_parse_error = rb_define_class_under(c_paludis_module, "DepStringParseError", c_dep_string_error);
+ c_dep_string_nesting_error = rb_define_class_under(c_paludis_module, "DepStringNestingError", c_dep_string_parse_error);
+
+ rb_define_const(c_paludis_module, "Version", rb_str_new2((stringify(PALUDIS_VERSION_MAJOR) + "."
+ stringify(PALUDIS_VERSION_MINOR) + "." + stringify(PALUDIS_VERSION_MICRO)).c_str()));
RegisterRubyClass::get_instance()->execute();
}
diff --git a/ruby/paludis_ruby.hh b/ruby/paludis_ruby.hh
index 829d7f5..752a214 100644
--- a/ruby/paludis_ruby.hh
+++ b/ruby/paludis_ruby.hh
@@ -39,7 +39,7 @@ namespace paludis
std::string value_case_to_RubyCase(const std::string & s);
- VALUE master_class();
+ VALUE paludis_module();
/* constructors */
diff --git a/ruby/portage_dep_parser.cc b/ruby/portage_dep_parser.cc
index fd8ff16..9b99781 100644
--- a/ruby/portage_dep_parser.cc
+++ b/ruby/portage_dep_parser.cc
@@ -74,7 +74,7 @@ namespace
{
rb_require("singleton");
- c_portage_dep_parser = rb_define_class_under(master_class(), "PortageDepParser", rb_cObject);
+ c_portage_dep_parser = rb_define_class_under(paludis_module(), "PortageDepParser", rb_cObject);
rb_funcall(c_portage_dep_parser, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_singleton_method(c_portage_dep_parser, "parse",
RUBY_FUNC_CAST(&portage_dep_parser_parse), -1);
diff --git a/ruby/portage_dep_parser_TEST.rb b/ruby/portage_dep_parser_TEST.rb
index dd08db2..e9b68ff 100644
--- a/ruby/portage_dep_parser_TEST.rb
+++ b/ruby/portage_dep_parser_TEST.rb
@@ -21,7 +21,7 @@
require 'test/unit'
require 'Paludis'
-class Paludis
+module Paludis
class TestCase_PortageDepParser < Test::Unit::TestCase
def test_one_arg
atom = PortageDepParser::parse("foo/monkey")
diff --git a/ruby/repository.cc b/ruby/repository.cc
index 50fc765..510029a 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -237,7 +237,7 @@ namespace
void do_register_repository()
{
- c_repository = rb_define_class_under(master_class(), "Repository", rb_cObject);
+ c_repository = rb_define_class_under(paludis_module(), "Repository", rb_cObject);
rb_funcall(c_repository, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_repository, "name", RUBY_FUNC_CAST(&repository_name), 0);
@@ -280,11 +280,11 @@ namespace
rb_define_method(c_repository, "info", RUBY_FUNC_CAST(&repository_info), 1);
- c_repository_info = rb_define_class_under(master_class(), "RepositoryInfo", rb_cObject);
+ c_repository_info = rb_define_class_under(paludis_module(), "RepositoryInfo", rb_cObject);
rb_funcall(c_repository_info, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_repository_info, "sections", RUBY_FUNC_CAST(&repository_info_sections), 0);
- c_repository_info_section = rb_define_class_under(master_class(), "RepositoryInfoSection", rb_cObject);
+ c_repository_info_section = rb_define_class_under(paludis_module(), "RepositoryInfoSection", rb_cObject);
rb_funcall(c_repository_info_section, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_repository_info_section, "kvs", RUBY_FUNC_CAST(&repository_info_section_kvs), 0);
}
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index 7bb954c..81ee8cf 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -25,7 +25,7 @@ require 'Paludis'
Paludis::Log.instance.log_level = Paludis::LogLevel::Warning
-class Paludis
+module Paludis
class TestCase_Repository < Test::Unit::TestCase
def test_no_create
assert_raise NoMethodError do
diff --git a/ruby/version_metadata.cc b/ruby/version_metadata.cc
index b53ea19..dcf8a57 100644
--- a/ruby/version_metadata.cc
+++ b/ruby/version_metadata.cc
@@ -121,7 +121,7 @@ namespace
void do_register_version_metadata()
{
- c_version_metadata = rb_define_class_under(master_class(), "VersionMetadata", rb_cObject);
+ c_version_metadata = rb_define_class_under(paludis_module(), "VersionMetadata", rb_cObject);
rb_funcall(c_version_metadata, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_version_metadata, "get_ebuild_interface", RUBY_FUNC_CAST(&version_metadata_get_ebuild_interface), 0);
rb_define_method(c_version_metadata, "get_virtual_interface", RUBY_FUNC_CAST(&version_metadata_get_virtual_interface), 0);
diff --git a/ruby/version_metadata_TEST.rb b/ruby/version_metadata_TEST.rb
index 6433e93..ba17836 100644
--- a/ruby/version_metadata_TEST.rb
+++ b/ruby/version_metadata_TEST.rb
@@ -23,7 +23,7 @@ require 'Paludis'
Paludis::Log.instance.log_level = Paludis::LogLevel::Warning
-class Paludis
+module Paludis
class TestCase_VersionMetadata < Test::Unit::TestCase
def test_no_create
assert_raise NoMethodError do
diff --git a/ruby/version_spec.cc b/ruby/version_spec.cc
index d5d9b88..725e873 100644
--- a/ruby/version_spec.cc
+++ b/ruby/version_spec.cc
@@ -82,7 +82,7 @@ namespace
void do_register_version_spec()
{
- c_version_spec = rb_define_class_under(master_class(), "VersionSpec", rb_cObject);
+ c_version_spec = rb_define_class_under(paludis_module(), "VersionSpec", rb_cObject);
rb_define_singleton_method(c_version_spec, "new", RUBY_FUNC_CAST(&version_spec_new), 1);
rb_define_method(c_version_spec, "initialize", RUBY_FUNC_CAST(&version_spec_init), 1);
rb_define_method(c_version_spec, "<=>", RUBY_FUNC_CAST(&Common<VersionSpec>::compare), 1);
diff --git a/ruby/version_spec_TEST.rb b/ruby/version_spec_TEST.rb
index 2e79786..746af15 100644
--- a/ruby/version_spec_TEST.rb
+++ b/ruby/version_spec_TEST.rb
@@ -21,7 +21,7 @@
require 'test/unit'
require 'Paludis'
-class Paludis
+module Paludis
class TestCase_VersionSpec < Test::Unit::TestCase
def test_create
v = VersionSpec.new("0")