Comments (1)
Thanks!
Sent from my iPhone
Christopher Thatcher
202-340-9685
[email protected]
On May 11, 2011, at 7:05 AM, [email protected] wrote:
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.
Reply to this email directly or view it on GitHub:
#34
from env-js.
Related Issues (20)
- Rhino XHR 404 Response Error
- Tag 1.3.pre1 Ant Build Failure on rhino-env target HOT 3
- Does it works with Ruby 1.9 and V8 on Linux box ? HOT 1
- Bug with Envjs.WriteToFile in envjs/platform/rubyracer.js on Linux
- 1.3pre1: jQuery 1.4.4 elements inaccessible with document.getElementById HOT 1
- 1.3pre1: parser.js missing primitive byte types HOT 1
- cookie problems in version 1.2
- Content-Length needs to be specdified for spydermonkey port
- Getting an error using this with Capybara 1.0.0 HOT 1
- Disable logging
- Created script node is evaluated immediately
- Issue with addEvent in dojo/_firebug/firebug.js HOT 1
- c.removeAttribute is not a function error
- print(JSON.stringify({re:/[a-z]/})); shows empty object HOT 4
- Is "}, get xml() {" found in dom.js really correct JavaScript syntax?
- Support metro style app
- compareDocumentPosition Error
- IPv6 Support
- Env.js Website Down? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from env-js.