From: Nathan Powell Date: 2008-09-18T02:02:56+09:00 Subject: Re: Calling a Method On Thu, Sep 18, 2008 at 01:57:31AM +0900, Henning Bekel wrote: > henning@box:~$ cat test.rb > def bar(p=ARGV[0]) > 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. -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 statesmen. ~ Bob Edwards ------------------------------------