Ruby's ARGV can be empty on windows depending on a way to run script

后端 未结 5 708
梦如初夏
梦如初夏 2021-01-12 16:27

My demo.rb:

puts ARGV.size

ARGV.each do |a|
  puts \"Argument: #{a}\"
end

The result depends on how we run a script:

>          


        
5条回答
  •  Happy的楠姐
    2021-01-12 16:48

    You can use a freeware tool from Nirsoft - FileTypesManager - to add the missing %* as mentioned in the other posts.

提交回复
热议问题