aboutsummaryrefslogtreecommitdiff
path: root/ruby/dep_spec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/dep_spec.cc')
-rw-r--r--ruby/dep_spec.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 7c13eabdd..aa377fc52 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -743,24 +743,20 @@ namespace
/*
* call-seq:
- * installable_to_path -> Hash or Nil
+ * installable_to_path_constraint ->
+ * InstallableToPathConstraintPool or Nil
*
- * Fetch the installable-to-path requirement.
+ * Fetch the installable-to-path constraint.
*/
VALUE
- package_dep_spec_installable_to_path(VALUE self)
+ package_dep_spec_installable_to_path_constraint(VALUE self)
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- std::shared_ptr<const InstallableToPath> i2p(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_ptr());
- if (! i2p)
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint()))
return Qnil;
- VALUE result(rb_hash_new());
- rb_hash_aset(result, ID2SYM(rb_intern("path")),
- rb_str_new2(stringify(i2p->path()).c_str()));
- rb_hash_aset(result, ID2SYM(rb_intern("include_masked?")),
- i2p->include_masked() ? Qtrue : Qfalse);
- return result;
+ return package_dep_spec_constraint_to_value(
+ std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint());
}
/*
@@ -1118,7 +1114,7 @@ namespace
rb_define_method(c_package_dep_spec, "from_repository_constraint", RUBY_FUNC_CAST(&package_dep_spec_from_repository_constraint), 0);
rb_define_method(c_package_dep_spec, "installable_to_repository", RUBY_FUNC_CAST(&package_dep_spec_installable_to_repository), 0);
rb_define_method(c_package_dep_spec, "installed_at_path_constraint", RUBY_FUNC_CAST(&package_dep_spec_installed_at_path_constraint), 0);
- rb_define_method(c_package_dep_spec, "installable_to_path", RUBY_FUNC_CAST(&package_dep_spec_installable_to_path), 0);
+ rb_define_method(c_package_dep_spec, "installable_to_path_constraint", RUBY_FUNC_CAST(&package_dep_spec_installable_to_path_constraint), 0);
rb_define_method(c_package_dep_spec, "version_requirements", RUBY_FUNC_CAST(&package_dep_spec_version_requirements_ptr), 0);
rb_define_method(c_package_dep_spec, "version_requirements_mode", RUBY_FUNC_CAST(&package_dep_spec_version_requirements_mode), 0);
#ifdef CIARANM_REMOVED_THIS