Yossef Mendelssohn wrote:
> I looked over the documentation. In my opinion, if you're defining
> methods like <, >, <<, or >> and they need to be called with explicit
> obj.< syntax, you're doing something wrong.

Those particular methods are module functions which do not get mixed-in, 
so there's no harm in having them that way.  In fact, the only way to 
access them from a mixed-in location is via the D constant:

  # not mixed-in
  Dfect .< { puts "hello" }
  Dfect::D .< { puts "hello" }

  # mixed-in
  include Dfect
  D .< { puts "hello" }

  # not possible
  include Dfect
  self .< { puts "hello" } # no method error "<" for self!

As for providing a block to those methods, the alternative requires too 
much typing for my taste:

  D < lambda { puts "hello" }

>> Version 0.0.0 (2009-04-13)
> 
> Why do you keep releasing gems that start at version 0.0.0?

Because the first number in computer science is 0. :-)
-- 
Posted via http://www.ruby-forum.com/.