Ron Green
9/17/2008 10:48:00 PM
Thanks Nathan.
On Sep 17, 12:02=A0pm, Nathan Powell <nat...@nathanpowell.org> wrote:
> On Thu, Sep 18, 2008 at 01:57:31AM +0900, Henning Bekel wrote:
> > henning@box:~$ cat test.rb
> > def bar(p=3DARGV[0])
> > =A0 puts "bar called with parameter '#{p}'"
> > end
> > henning@box:~$ ruby -rtest -e 'bar' Hello
> > bar called with parameter 'Hello'
>
> Nice. I should have looked at the Ruby man page. =A0-r makes sense.
>
> Though I would have done this:
>
> npowell@delilah ~ $ ruby -r test -e 'bar("Oh Hai")'
> Oh Hai
>
> Just to keep from having to add the ARGV[0] as the default value.
> --
> nathan
> nathan_at_nathanpowell_dot_org
>
> Now I know what a statesman is; he's a dead politician. We need more stat=
esmen.
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0~ Bob Edwards
> ------------------------------------