Try $0

----- Original Message ----
From: "" <>
To: Watir General <>
Sent: Tuesday, March 24, 2009 12:16:56 PM
Subject: [wtr-general] Get script name within the script

ARGV allows us to get script's input parameters.
Is there a way to extract the script name from the following command:

ruby script_name.rb param1 param2

I need to get 'script_name'. I use it later to name the results file
after the script name.

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to
Before posting, please read the following guidelines:
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to