You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you start it with Ruby 1.8 you will have :
ARGV_0 <> (Array)
ARGV_1 <foo, 2, 3, 4> (Array)
$FILENAME <-> (String)
ARGV_2 <foo, 2, 3, 4> (Array)
which is right and works with 'bin/envjs rubyracer foo.js' as written in the last line of 'envjs/rubyracer.rb'.
but if you try it with Ruby 1.9 you will have :
ARGV_0 <> (Array)
ARGV_1 <foo, 2, 3, 4> (Array)
*** EXCEPTION <No such file or directory - foo>
STACK=<./this_script.rb:XX:in `
'>
ARGV_2 <2, 3, 4> (Array)
which does not work with 'bin/envjs rubyracer foo.js' as written in the last line of 'envjs/rubyracer.rb'.
I suggest to ignore the global variable '$FILENAME'
Probably you have that problem with all JavaScript engines and Ruby.
Regards.
The text was updated successfully, but these errors were encountered:
If you start it with Ruby 1.8 you will have :
ARGV_0 <> (Array)
ARGV_1 <foo, 2, 3, 4> (Array)
$FILENAME <-> (String)
ARGV_2 <foo, 2, 3, 4> (Array)
which is right and works with 'bin/envjs rubyracer foo.js' as written in the last line of 'envjs/rubyracer.rb'.
but if you try it with Ruby 1.9 you will have :
ARGV_0 <> (Array)
ARGV_1 <foo, 2, 3, 4> (Array)
*** EXCEPTION <No such file or directory - foo>
STACK=<./this_script.rb:XX:in `
'>
ARGV_2 <2, 3, 4> (Array)
which does not work with 'bin/envjs rubyracer foo.js' as written in the last line of 'envjs/rubyracer.rb'.
I suggest to ignore the global variable '$FILENAME'
Probably you have that problem with all JavaScript engines and Ruby.
Regards.
Reply to this email directly or view it on GitHub: #34
Hello,
With this little script :
puts " ARGV_0 <#{ARGV.join(", ")}> (#{ARGV.class})"
["foo",2,3,4].each{|p| ARGV.push p}
puts " ARGV_1 <#{ARGV.join(", ")}> (#{ARGV.class})"
begin
puts " $FILENAME <#{$FILENAME}> (#{$FILENAME.class})"
rescue => ex
puts " *** EXCEPTION <#{ex.message}>\n STACK=<#{ex.backtrace.join("\n")}>"
end
puts " ARGV_2 <#{ARGV.join(", ")}> (#{ARGV.class})"
If you start it with Ruby 1.8 you will have :
ARGV_0 <> (Array)
ARGV_1 <foo, 2, 3, 4> (Array)
$FILENAME <-> (String)
ARGV_2 <foo, 2, 3, 4> (Array)
which is right and works with 'bin/envjs rubyracer foo.js' as written in the last line of 'envjs/rubyracer.rb'.
but if you try it with Ruby 1.9 you will have :
'>ARGV_0 <> (Array)
ARGV_1 <foo, 2, 3, 4> (Array)
*** EXCEPTION <No such file or directory - foo>
STACK=<./this_script.rb:XX:in `
ARGV_2 <2, 3, 4> (Array)
which does not work with 'bin/envjs rubyracer foo.js' as written in the last line of 'envjs/rubyracer.rb'.
I suggest to ignore the global variable '$FILENAME'
Probably you have that problem with all JavaScript engines and Ruby.
Regards.
The text was updated successfully, but these errors were encountered: