My script creates some variables like this:
instance_variable_set "@_#{pos}", dir
where pos is an integer. This gives me some instance variables @_1, @_2, @_3, etc. My script receives an argument (a number) from the command line, and that number needs to refer to an instance variable created like this:
puts $path.gsub(@_(pos), "")
For example, if ARGV[0] is 1, then I need to use var @_1 in a command like gsub like this:
puts $path.gsub(@_1, "")
How can I do this?