On Wed, Oct 2, 2013 at 4:01 PM, Tamara Temple <tamouse.lists / gmail.com> wro=
te:
>
> On Oct 2, 2013, at 8:41 AM, Robert Klemme <shortcutter / googlemail.com> wr=
ote:
>
>> On Wed, Oct 2, 2013 at 2:59 PM, Tamara Temple <tamouse.lists / gmail.com> =
wrote:
>>
>>> Dir['**/'].each {|f| =85}
>>>
>>> which is the same as
>>>
>>> Dir.glob('**/') {|f| =85 }
>>
>> Not exactly: Dir.[] will always create an Array.  Dir.glob() will only
>> create an Array if no block is given. If there is a block, it is
>> invoked for each match.  That may actually make a difference.
>>
>
> That's basically what I said here:
>
>>> Dir['**/'] is equivalent to Dir.glob('**/',0) (without the block, .glob=
() returns an array).

I was just trying to avoid that your statement

> Dir['**/'].each {|f| =85}
>
> which is the same as
>
> Dir.glob('**/') {|f| =85 }

is not misunderstood because it is not the same.

Cheers

robert

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/