Package: rails
Version: 2.0.2-2
Severity: grave
Tags: patch
Justification: renders package unusable

Since I upgraded to ruby 1.8.7 from sid, my rails applications started
to break. The problem is that the core extension in activesupport in
2.0.x are not compatible with ruby 1.8.7.

To reproduce you can run the activesupport unit tests with ruby 1.8.7
installed. 

I backported change f67b070facef6574df3c4386e3975242273fe456 from
upstream's git repo ("edge rails") to 2.0.2, and AFAICT everything works
now (e.g.  activesupport unit tests all pass, and my applications work
again). Follows the patch attached.

Cheers,


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=pt_BR.utf8, LC_CTYPE=pt_BR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages rails depends on:
ii  dpkg             1.14.19                 package maintenance system for Deb
ii  liberb-ruby      4.2                     transitional dummy package
ii  libpgsql-ruby1.8 0.7.9.2008.03.18-1      PostgreSQL interface for Ruby 1.8
ii  libredcloth-ruby 3.0.99.0.svn.20060519-1 Textile module for Ruby 1.8
ii  libruby [liberb- 4.2                     Libraries necessary to run Ruby 1.
ii  libruby1.8-extra 0.4                     a bundle of additional libraries f
ii  libsqlite3-ruby1 1.2.1-1                 SQLite3 interface for Ruby 1.8
ii  rake             0.8.1-3                 a ruby build program
ii  rdoc             4.2                     Generate documentation from ruby s
ii  ruby             4.2                     An interpreter of object-oriented 
ii  ruby1.8          1.8.7-1                 Interpreter of object-oriented scr
ii  rubygems         1.1.1-1                 package management framework for R

Versions of packages rails recommends:
ii  irb                           4.2        Interactive Ruby (irb)
ii  libmocha-ruby1.8              0.5.6-1    Mocking and stubbing library for R

-- no debconf information

-- 
Antonio Terceiro <[EMAIL PROTECTED]>
http://people.softwarelivre.org/~terceiro/
GnuPG ID: 0F9CB28F


diff --git a/activesupport/lib/active_support/core_ext/string/unicode.rb b/activesupport/lib/active_support/core_ext/string/unicode.rb
index dd19fe5..844f7de 100644
--- a/activesupport/lib/active_support/core_ext/string/unicode.rb
+++ b/activesupport/lib/active_support/core_ext/string/unicode.rb
@@ -3,6 +3,12 @@ module ActiveSupport #:nodoc:
     module String #:nodoc:
       # Define methods for handling unicode data.
       module Unicode
+        def self.included(base)
+          if '1.8.7'.respond_to?(:chars)
+            base.class_eval { remove_method :chars }
+          end
+        end
+
         # +chars+ is a Unicode safe proxy for string methods. It creates and returns an instance of the
         # ActiveSupport::Multibyte::Chars class which encapsulates the original string. A Unicode safe version of all
         # the String methods are defined on this proxy class. Undefined methods are forwarded to String, so all of the

Reply via email to