Errno::ENOENT when evaluating $FILENAME in 1.9.x

Given foo.rb with the single line:

Run, under Ruby 1.9:
ruby foo.rb asdf

Gets error:
foo.rb:1:in `’: No such file or directory - asdf (Errno::ENOENT)

This duplicates the way the Rails passes the webserver name (ie
“script/server webrick”)

Under Ruby 1.8.6, I get the output “-”; no exception.

Is this a problem with Ruby 1.9, Rails, or something else?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs