tfpt review "/shelveset:mangling;REDMOND\tomat"
  Comment  : 
  Improves name mangling. Implements some heuristics to handle abbreviation 
mangling (see unit tests in RubyUtilsTests.cs).
  
  Adds mangle (alias clr_to_ruby) and unmangle (alias ruby_to_clr) singleton 
methods to  IronRuby::Clr::Name class that convert names between CLR naming 
convention and Ruby convention. They both return nil if the mapping is 
undefined:
  
  >>> IronRuby::Clr::Name.mangle('FooBar')
  => "foo_bar"
  >>> IronRuby::Clr::Name.mangle('fooBar')
  => "foo_bar"
  >>> IronRuby::Clr::Name.mangle('foNBar')
  => "fo_n_bar"
  >>> IronRuby::Clr::Name.mangle('fNNBar')
  => "f_nn_bar"
  >>> IronRuby::Clr::Name.mangle('NNNBar')
  => nil
  >>> IronRuby::Clr::Name.mangle('MyUIApp')
  => "my_ui_app"
  >>> IronRuby::Clr::Name.unmangle('my_ui_app')
  => "MyUIApp"
  >>> IronRuby::Clr::Name.unmangle('my_ui_id')
  => "MyUIId"
  >>> IronRuby::Clr::Name.unmangle('my_id')
  => "MyId"
  >>> IronRuby::Clr::Name.unmangle('my_id_ya')
  => "MyIdYA"
  >>> IronRuby::Clr::Name.unmangle('my_id_html')
  => "MyIdHtml"
  >>> IronRuby::Clr::Name.unmangle('my_id_xml')
  => "MyIdXml"
  >>> IronRuby::Clr::Name.unmangle('NaN')
  => nil
  >>> IronRuby::Clr::Name.mangle('NaNa')
  => "na_na"
  
  Fixes bug: 
  http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1677: Issues with 
name mangling.


Attachment: mangling.diff
Description: mangling.diff

_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to