subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <julianf...@apache.org>
Subject Re: Ruby bindings failure, perhaps related to __?
Date Thu, 27 Sep 2018 16:09:44 GMT
Julian Foad wrote:
> subversion/bindings/swig/ruby/svn/util.rb:40:in `block in 
> to_ruby_class_name': undefined method `downcase' for nil:NilClass

I learnt enough Ruby to fix it in r1842107, nominated for backport to 1.11.

The problem was it was trying to convert a struct type name like
svn_client__shelf_t
to a CamelCase Ruby class name like
Svn::Client::Shelf
but it couldn't handle the extra underscore.

We had to decide what the class name should be: "Shelf" or "_Shelf" or "XShelf" or "X_Shelf"
or something like "svn_client__shelf" or other variants.

I found Ruby doesn't allow a class name to begin with an underscore, and we didn't want to
pollute the "stable" namespace with an unstable API by using just "Shelf", so in the end I
chose "XShelf":

Svn::Client::XShelf

We should treat this as an interim solution and examine what we are doing with the other language
bindings and potentially change to a more widely consistent solution later.

-- 
- Julian

Mime
View raw message