[Rubycocoa-devel 433] [fix]automatic ns_overrides incorrectky work

Back to archive index

kimura wataru kimur****@i*****
Thu Nov 2 11:44:59 JST 2006


Hi,

I found a bug in _ns_behavior_method_added() and fixed trunk and
apple-unstable branch. The procedure of getting a selector from 
ruby's symbol was not correctly. So, RubyCocoa did not override
methods contains "_".


=== framework/src/ruby/osx/objc/oc_import.rb
==================================================================
--- framework/src/ruby/osx/objc/oc_import.rb	(revision 1323)
+++ framework/src/ruby/osx/objc/oc_import.rb	(revision 1324)
@@ -217,7 +217,7 @@
     alias_method :ib_outlets, :ns_outlets
 
     def _ns_behavior_method_added(sym)
-      sel = sym.to_s.gsub(/[^(A_*)]_/, ':')
+      sel = sym.to_s.gsub(/[^(A_*)]¥(_¥)/, ':')
       sel << ':' if instance_method(sym).arity > 0 and /[^:]¥z/ =~ sel
       return unless _ns_enable_override?(sel)
       ns_override sel

-- 
kimura wataru



More information about the Rubycocoa-devel mailing list
Back to archive index