Teach the Ruby bindings to handle experimental class names like
svn_client__shelf_t.
* subversion/bindings/swig/ruby/svn/util.rb
(to_ruby_class_name): Don't choke on a name like '_shelf': return 'XShelf'.
@@ -36,8 +36,13 @@ module Svn
module Util #:nodoc:
module_function
def to_ruby_class_name(name)
+ # Convert to CamelCase with 'X' for a leading/double/trailing underscore.
name.to_s.split("_").collect do |x|
- "#{x[0,1].upcase}#{x[1..-1].downcase}"
+ if x.empty?
+ "X"
+ else
+ x.capitalize
+ end
end.join("")
end
