From: Laurent S. <lsa...@ap...> - 2007-08-31 15:15:56
|
On Aug 29, 2007, at 7:50 PM, sergio wrote: > I did some googling and I found that the arity conventions in ruby > 1.9 could change... I don't know what is the official source of > information about 1.9, but I found this interesting: > > (1) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/120252 > (2) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11029? > help-en > (3) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/249149 > > in short, it seems that in 1.9 both proc{}.arity and proc{||}.arity > shall return 0 -- by definition (1) -- although it seems (3) that in > some not so old ruby 1.9.0 release both returned -1. in any case, > this would be a change from how it works now. if what I am saying is > just crap, simply ignore it... :-) Interesting, I didn't know that at least the core team decided to investigate a new behavior for 1.9. Let's keep the RubyCocoa exception for -1 arity methods then, it doesn't really harm and we have this workaround :) Laurent |