Author: jreidinger Date: Thu Jan 19 13:15:21 2012 New Revision: 67231 URL: http://svn.opensuse.org/viewcvs/yast?rev=67231&view=rev Log: improve previous fix to allow loading also file in namespace (e.g. Name::Test in name/test ) (bnc#705417) Modified: trunk/ruby-bindings/package/yast2-ruby-bindings.changes trunk/ruby-bindings/src/ruby/Y2RubyComponent.cc Modified: trunk/ruby-bindings/package/yast2-ruby-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/package/yast2-ruby-bindings.changes?rev=67231&r1=67230&r2=67231&view=diff ============================================================================== --- trunk/ruby-bindings/package/yast2-ruby-bindings.changes (original) +++ trunk/ruby-bindings/package/yast2-ruby-bindings.changes Thu Jan 19 13:15:21 2012 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Jan 19 12:11:56 UTC 2012 - jreidinger@suse.com + +- improve previous fix to allow loading also file in namespace ( + e.g. Name::Test in name/test ) (bnc#705417) + +------------------------------------------------------------------- Mon Jan 16 15:16:39 UTC 2012 - coolo@suse.com - license should be GPL-2.0 without or later Modified: trunk/ruby-bindings/src/ruby/Y2RubyComponent.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/src/ruby/Y2RubyComponent.cc?rev=67231&r1=67230&r2=67231&view=diff ============================================================================== --- trunk/ruby-bindings/src/ruby/Y2RubyComponent.cc (original) +++ trunk/ruby-bindings/src/ruby/Y2RubyComponent.cc Thu Jan 19 13:15:21 2012 @@ -84,7 +84,14 @@ size_t size = res.size(); if (size==0) return res; - res[0] = tolower(res[0]); //first character breaks rule with replace upper with _lower + res[0] = tolower(res[0]); + //first character and first char after :: is lowercase without underscore + for(size_t i = res.find("::",i+1); i!= string::npos; i = res.find("::",i+1)) + { + size_t c_pos = i+2; //::<c> so we want c + if (c_pos >= size) break; //handle string finishing with :: + res[c_pos] = tolower(res[c_pos]); + } for (size_t i = 1; i< res.size();i++) { if (isupper(res[i])) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org