>>>>> "m" ==   <mengx / nielsenmedia.com> writes:

m> Looks like it only happens in string evaluation? apparently, Ruby's

 no, each time ruby want to make a conversion for example

pigeon% cat b.rb
#!/usr/bin/ruby
class Fixnum
   private
   def to_ary
      [self]
   end
end

p([1] + 2)
2.to_ary
pigeon% 

pigeon% b.rb
[1, 2]
./b.rb:10: private method `to_ary' called for 2:Fixnum (NameError)
pigeon% 


m> interpreter bypasses the rule, correct?

 well it not really bypasse the rule, because (in my previous example) it's
 an implicit call to #to_ary, which is different from 2.to_ary where you
 specify a call to a public method


Guy Decoux