Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #7231

Re: Input_file = ARGV.first

Newsgroups comp.lang.ruby
Date 2016-04-19 04:12 -0700
References <7eed3dbb-85c0-4ba4-a429-7096d74c9d6d@googlegroups.com> <57160BB6.5080406@idealan.pl>
Message-ID <9a71a024-4d03-4027-b260-1a0da2d3c4bb@googlegroups.com> (permalink)
Subject Re: Input_file = ARGV.first
From Cai Gengyang <gengyangcai@gmail.com>

Show all headers | View raw


Oh ok, so for the question in the study drill --- "Write English comments for each line to understand what that line does." , what should I write beside the line Input_file = ARGV.first ?

I am trying to complete this exercise : http://learnrubythehardway.org/book/ex20.html

Thx ...

On Tuesday, April 19, 2016 at 6:43:02 PM UTC+8, jacki wrote:
> W dniu 2016-04-19 o 12:02, Cai Gengyang pisze:
> > What does this line in Ruby : Input_file = ARGV.first mean ?
> > 
> > How does it work? Can give an example ? HELP , HELP .....
> > 
> 
> $ cat argv.rb
> #!/usr/bin/env ruby
> 
> puts ARGV.inspect
> 
> 
> $ ruby argv.rb hard to say
> ["hard", "to", "say"]

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Input_file = ARGV.first Cai Gengyang <gengyangcai@gmail.com> - 2016-04-19 03:02 -0700
  Re: Input_file = ARGV.first jacki <collector@idealan.pl> - 2016-04-19 12:43 +0200
    Re: Input_file = ARGV.first Cai Gengyang <gengyangcai@gmail.com> - 2016-04-19 04:12 -0700
      Re: Input_file = ARGV.first jacki <collector@idealan.pl> - 2016-04-19 15:52 +0200

csiph-web