aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-11-09 19:11:23 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-11-09 19:11:23 +0000
commitcef17ecb677ad8e3edf3c184abe5b6c12387c025 (patch)
treebe18a3ddb43681519154764a8fcc2030267008e5
parent58fff5eb18aa310bdfaee3915763f1ad8bf0b642 (diff)
downloadpaludis-cef17ecb677ad8e3edf3c184abe5b6c12387c025.tar.gz
paludis-cef17ecb677ad8e3edf3c184abe5b6c12387c025.tar.xz
(ruby) Rename Paludis::version_operator to Paludis::version_spec_comparator
-rw-r--r--doc/api/index.html.part2
-rw-r--r--doc/api/ruby/example_version_operator.rb2
-rw-r--r--ruby/paludis_ruby.cc10
-rw-r--r--ruby/paludis_ruby_TEST.rb14
4 files changed, 14 insertions, 14 deletions
diff --git a/doc/api/index.html.part b/doc/api/index.html.part
index 6abaff1..cb0c3b9 100644
--- a/doc/api/index.html.part
+++ b/doc/api/index.html.part
@@ -147,7 +147,7 @@ how concepts map on to different language bindings.</p>
<tr>
<td>example_version_operator</td>
<td><a href="cplusplus/example__version__operator_8cc-example.html">C++</a></td>
- <td></td>
+ <td><a href="ruby/example_version_operator.html">Ruby</a></td>
<td></td>
</tr>
<tr>
diff --git a/doc/api/ruby/example_version_operator.rb b/doc/api/ruby/example_version_operator.rb
index 15e31b4..1a4c3e8 100644
--- a/doc/api/ruby/example_version_operator.rb
+++ b/doc/api/ruby/example_version_operator.rb
@@ -31,7 +31,7 @@ versions.each do |v1|
#Apply all of our operators, and show the results
operators.each do |operator|
- print " | " + (Paludis::version_operator(operator, v1, v2) ? 'true' : 'false').ljust(8)
+ print " | " + (Paludis::version_spec_comparator(operator, v1, v2) ? 'true' : 'false').ljust(8)
end
puts
end
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
index fc8932a..c610ea1 100644
--- a/ruby/paludis_ruby.cc
+++ b/ruby/paludis_ruby.cc
@@ -104,14 +104,14 @@ namespace
}
/*
- * Document-method: version_operator
+ * Document-method: version_spec_comparator
*
* call-seq:
- * version_operator(operator, left_version_spec, right_version_spec) -> true of false
+ * version_spec_comparator(operator, left_version_spec, right_version_spec) -> true of false
*
- * Applies operator to left_version_spec andn right_version_spec
+ * Applies operator to left_version_spec and right_version_spec
*/
- VALUE paludis_version_operator(VALUE, VALUE op, VALUE left, VALUE right)
+ VALUE paludis_version_spec_comparator(VALUE, VALUE op, VALUE left, VALUE right)
{
try
{
@@ -435,7 +435,7 @@ void PALUDIS_VISIBLE paludis::ruby::init()
c_bad_version_operator_error = rb_define_class_under(c_paludis_module, "BadVersionOperatorError", rb_eRuntimeError);
rb_define_module_function(c_paludis_module, "match_package", RUBY_FUNC_CAST(&paludis_match_package), 3);
- rb_define_module_function(c_paludis_module, "version_operator", RUBY_FUNC_CAST(&paludis_version_operator), 3);
+ rb_define_module_function(c_paludis_module, "version_spec_comparator", RUBY_FUNC_CAST(&paludis_version_spec_comparator), 3);
rb_define_const(c_paludis_module, "Version", rb_str_new2((stringify(PALUDIS_VERSION_MAJOR) + "."
+ stringify(PALUDIS_VERSION_MINOR) + "." + stringify(PALUDIS_VERSION_MICRO)).c_str()));
diff --git a/ruby/paludis_ruby_TEST.rb b/ruby/paludis_ruby_TEST.rb
index 02e2452..892c812 100644
--- a/ruby/paludis_ruby_TEST.rb
+++ b/ruby/paludis_ruby_TEST.rb
@@ -61,24 +61,24 @@ module Paludis
end
end
- def test_version_operator
+ def test_version_spec_comparator
one = VersionSpec.new('1')
two = VersionSpec.new('2')
- assert Paludis::version_operator('<', one, two)
- assert Paludis::version_operator('<=', one, two)
- assert !Paludis::version_operator('>=', one, two)
- assert !Paludis::version_operator('>', one, two)
+ assert Paludis::version_spec_comparator('<', one, two)
+ assert Paludis::version_spec_comparator('<=', one, two)
+ assert !Paludis::version_spec_comparator('>=', one, two)
+ assert !Paludis::version_spec_comparator('>', one, two)
end
def test_bad_version_operator
one = VersionSpec.new('1')
two = VersionSpec.new('2')
assert_raise BadVersionOperatorError do
- Paludis::version_operator('throw an error', one, two)
+ Paludis::version_spec_comparator('throw an error', one, two)
end
assert_raise ArgumentError do
- Paludis::version_operator('throw an error')
+ Paludis::version_spec_comparator('throw an error')
end
end
end