RUBYOPT=-rubygems causes various problems for JRuby
---------------------------------------------------
Key: JRUBY-4062
URL: http://jira.codehaus.org/browse/JRUBY-4062
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.4.0RC1
Environment: jruby -v
jruby 1.5.0dev (ruby 1.8.7 patchlevel 174) (2009-10-06 6025864) (Java
HotSpot(TM) Client VM 1.6.0_03) [i386-java]
Reporter: Vladimir Sizikov
Assignee: Nick Sieger
Fix For: JRuby 1.4
I think this needs to be investigated for 1.4. Since this is the first version
that comes with handling RUBYOPT variable.
*1*. On my Linux box, makes nil *tainted*!
{noformat}
jruby -e "require 'rubygems'; p nil.tainted?"
{noformat}
*2*. On my Linux and Windows boxes:
{code}
echo $RUBYOPT
rubygems
jruby -S gem list
ERROR: Invalid option: -rubygems. See 'gem --help'.
{code}
*3*. On my Windows box:
{code}
D:\work\jruby-dev\jruby>jruby test\test_command_line_switches.rb
Loaded suite test\test_command_line_switches
Started
..ERROR: Invalid option: -rubygems. See 'gem --help'.
F............Exception in thread "main"
D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi/types.rb:
126:in `initialize': Insecure operation - initialize (SecurityError)
from
D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi/types.rb:126:in
`open'
from
D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi/types.rb:126
from
D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi/types.rb:71:in
`require'
from
D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi/ffi.rb:71
from
D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi/ffi.rb:1:in
`require'
from D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi.rb:1
from
D:/work/jruby-dev/jruby/bin/../lib/ruby/site_ruby/shared/ffi.rb:4:in `require'
from D:/work/jruby-dev/jruby/bin/../lib/ruby/1.8/Win32API.rb:4
.....
1) Failure:
test_dash_big_S_executes_script_in_jruby_bin_dir(TestCommandLineSwitches)
[<script>:1]:
<""> expected to be =~
</^\d+\.\d+\.\d+/>.
2) Failure:
test_dash_little_v_version_verbose_T_taint_d_debug_K_kcode_r_require_b_benchmarks_a_splitsinput_I_loadpath_C_c
wd_F_delimeter_J_javaprop(TestCommandLineSwitches)
[test\test_command_line_switches.rb:97]:
<nil> expected to be =~
</true$/>.
{code}
*4*. On my Windows box, the build produces
{noformat}
ant jar
....
_update_scm_revision_with_jruby_:
[java] JVM args ignored when same JVM is used.
[java] org.jruby.exceptions.RaiseException: no such file to load -- ubygems
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[java] at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[java] at
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
[java] at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
{noformat}
--
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