Remove noisy warning when setting ScriptEngine.ARGV
---------------------------------------------------

                 Key: JRUBY-4948
                 URL: http://jira.codehaus.org/browse/JRUBY-4948
             Project: JRuby
          Issue Type: Improvement
          Components: Embedding
    Affects Versions: JRuby 1.5.1
            Reporter: Trejkaz
            Priority: Minor


I made a simple script which just does a "p ARGV.inspect", and a container 
which sets ScriptEngine.ARGV before running the script.

When run this, I see:

{noformat}
>app -script d:\Scripts\args.rb test hi there
:1 warning: already initialized constant ARGV
Hi from inside the script.  Command-line arguments: ["test", "hi", "there"]
{noformat}

It would be nice if this warning could be suppressed somehow.

I am aware that it is possible to run more than one script using the same 
engine, and that it helps to have a warning for that particular situation, but 
the use case here is running a single script as the main entry point.

One possible compromise might be to only show it when set the second and 
subsequent times.


-- 
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


Reply via email to