Package: rubygems-integration
Version: 1.0
Severity: important

ruby1.9.1 -W (as used by the gem2deb test runner, apparently), warns
about discarding implementations in operating_system.rb:

% echo 'require "rubygems"' | ruby1.9.1 -W
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:3: warning: 
method redefined; discarding old default_dir
/usr/lib/ruby/1.9.1/rubygems/defaults.rb:25: warning: previous definition of 
default_dir was here
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:7: warning: 
method redefined; discarding old default_bindir
/usr/lib/ruby/1.9.1/rubygems/defaults.rb:96: warning: previous definition of 
default_bindir was here

Attached is a patch that "fixes" these warnings by aliasing the old 
definitions, not sure if this is the way to go.

  -ch

-- System Information:
Debian Release: 6.0.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-openvz-amd64 (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb	2012-06-30 21:34:29.576424151 +0200
+++ operating_system.rb	2012-06-30 21:34:24.604473172 +0200
@@ -1,9 +1,11 @@
 class << Gem
 
+  alias :upstream_default_dir :default_dir
   def default_dir
     File.join('/', 'var', 'lib', 'gems', Gem::ConfigMap[:ruby_version])
   end
 
+  alias :upstream_default_bindir :default_bindir
   def default_bindir
     File.join('/', 'usr', 'local', 'bin')
   end

Reply via email to