I noticed the following behavior:
class C
def m( *args ); args.inspect; end
end
m = C.new.method( :m ) # method "m" of new instance
def yield_with_args( *args ); yield( *args ); end
def yield_without_args; yield; end
puts yield_with_args( &m ) => [] # expected: no arg
puts yield_without_args( &m ) => [nil] # strange
Is this a bug or a feature?
Pit