Peter Brant wrote:
Sounds good and thanks.  As it turned out, I didn't have a chance to
come back to it yesterday either.

I did not release yet. Feel free to do so. What I think would be the best is this patch to ruby-debug:

====
...rubyforge.org/ruby-debug/trunk$ svn di lib/ruby-debug-base.rb
Index: lib/ruby-debug-base.rb
===================================================================
--- lib/ruby-debug-base.rb      (revision 315)
+++ lib/ruby-debug-base.rb      (working copy)
@@ -1,4 +1,4 @@
-require 'ruby_debug.so'
+require 'ruby_debug'

 SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__
 SCRIPT_TIMESTAMPS__ = {} unless defined? SCRIPT_TIMESTAMPS__
====

Running under CRuby it automatically correctly finds and requires ruby_debug.so and under JRuby it tries to locate correctly ruby_debug.jar (currently we have ruby_debug_base.jar). The only problem is if both gems:

====
...rubygems/gemrepo/gems$ ls -d1 ruby-debug-base*
ruby-debug-base-0.9.4/
ruby-debug-base-0.9.4-java/
====

are installed. Then CRuby has a problem:

====
...rubygems/gemrepo/gems$ jruby -e "require 'rubygems'; require 'ruby_debug'"
...rubygems/gemrepo/gems$ ruby -e "require 'rubygems'; require 'ruby_debug'"
...ruby-1.8.6-p110/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require': no such file to load -- ruby_debug (LoadError) from /space/ruby/ruby-1.8.6-p110/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from -e:1
...rubygems/gemrepo/gems$ gem uninstall ruby-debug-base

Select gem to uninstall:
 1. ruby-debug-base-0.9.4
 2. ruby-debug-base-0.9.4-java
 3. All versions
> 2
Successfully uninstalled ruby-debug-base version 0.9.4
...rubygems/gemrepo/gems$ ruby -e "require 'rubygems'; require 'ruby_debug'"
====

So there is a conflict between ruby-debug-base-0.9.4 and ruby-debug-base-0.9.4-java (CRuby see '-java' as higher version probably). Could be solved in RubyGems? Might be Chris knows right people? ;) If this would work we would be without any problems and we would get rid of copy-pasted ruby-debug-base.rb just because of jar-require.
Will try to poke more. Until this works we might come with some workaround.

  m.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to