ARGV is set to nil in ruby 1.8.5 when using test/unit

  • Thread starter Gunnar Gauslaa Bergem
  • Start date
G

Gunnar Gauslaa Bergem

Could anyone please explain what is going on here? Our test/unit scripts
suddenly stopped working properly when upgrading to 1.8.5 from 1.8.4.

Example script:
require 'test/unit'

class TestArgv < Test::Unit::TestCase

def test_argv
puts "test_argv: #{ARGV[0]}"
puts ARGV[0].nil?
end
end


Running on 1.8.4:

$ ruby -v
ruby 1.8.4 (2005-12-24) [i386-freebsd4]

$ ruby test_argv.rb randomarg
Loaded suite test_argv
Started
test_argv: randomarg
false
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top