Make ARGV via embedding work same as it does when running jruby itself
----------------------------------------------------------------------
Key: JRUBY-4949
URL: http://jira.codehaus.org/browse/JRUBY-4949
Project: JRuby
Issue Type: Improvement
Components: Embedding
Affects Versions: JRuby 1.5.1
Reporter: Trejkaz
Priority: Minor
I have a script which is just like this:
{code}
puts "ARGV = #{ARGV.inspect}"
{code}
If I run this from JRuby, I get:
{noformat}
>java -jar jruby-complete.jar -S d:\Scripts\args.rb hi there
ARGV = ["hi", "there"]
{noformat}
But if I run this through our own app which is using the JSR223 container, I
get:
{noformat}
>app -script d:\Scripts\args.rb hi there
:1 warning: already initialized constant ARGV
ARGV = #<#<Class:01x1a422d9>:0xb81eaa>
{noformat}
It would be nice if passing an array or a list into ScriptEngine.ARGV would
work exactly the same as if we had passed it through on the command-line in the
normal way, but it prints this irrespective of whether I pass it an array or a
list.
If I print out ARGV.to_a.inspect instead, I get the expected output.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email