The square brackets are there simply to indicate this is an optional argument.

You can sometimes even come across methods that have nested brackets -
e.g. something( arg1 [, arg2 [, arg3 ]] ) - this simply means that all
arguments except the first are optional. This is a quite widely used
convention, also present in, for example, PHP documentation.


-- Matma Rex



2011/8/14 amir e. <aef1370 / gmail.com>:
> Bartosz Dziewoski , I am very thankful from you. but I have another
> question I don't understand exactly what is the [,opt] and how can I use
> that ?
> thanks
>
> --
> Posted via http://www.ruby-forum.com/.
>