Package: libchronic-ruby
Version: 0.2.3-1
Severity: normal
Tags: patch

Chronic is smashing the ruby library search path with the first line
of /usr/lib/ruby/1.8/chronic.rb:

$:.unshift File.dirname(__FILE__)     # For use/testing when no gem is installed

This causes problems when trying to prepend items to the library
search path from the command-line. For example, when trying to run the
sup mail client from a git checkout, sup recommends that one run:

        ruby -I ./lib -w ./bin/sup

The current libchronic-ruby breaks this invocation in the case that an
older copy of sup is installed in /usr/lib/ruby/1.8, (for example from
the sup-mail Debian package).

What happens is that many of sup's files are loaded from ./lib, until
chronic is loaded. After that, subsequent sup files are loaded from
/usr/lib/ruby/1.8 and as can be imagined, that leads to lots of
failure.

Removing the line above from chronic.rb fixes this problem, (see
trivial patch below).

-Carl

PS. I wanted to submit this bug upstream, but failed to find any
contact information at http://chronic.rubyforge.net. So I'm grateful
that Debian gives me a place to lodge the report for now.

diff -urN libchronic-ruby-0.2.3-orig/lib/chronic.rb 
libchronic-ruby-0.2.3/lib/chronic.rb
--- libchronic-ruby-0.2.3-orig/lib/chronic.rb   2009-08-19 14:49:34.000000000 
-0700
+++ libchronic-ruby-0.2.3/lib/chronic.rb        2009-08-19 14:48:49.000000000 
-0700
@@ -7,8 +7,6 @@
 #
 #=============================================================================
 
-$:.unshift File.dirname(__FILE__)     # For use/testing when no gem is 
installed
-
 require 'chronic/chronic'
 require 'chronic/handlers'
 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to