diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-23 14:43:05 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-23 15:05:57 -0800 |
commit | 5d3712a81e502f46b2745d238d9bb76fcdb31f5b (patch) | |
tree | 35da6b6dac2cf42e747de076f47c310f6737f5d4 /activesupport/lib/active_support/vendor/builder-2.1.2/builder | |
parent | 6de241be8134a2b25ef17a5418db0348df07423c (diff) | |
download | rails-5d3712a81e502f46b2745d238d9bb76fcdb31f5b.tar.gz rails-5d3712a81e502f46b2745d238d9bb76fcdb31f5b.tar.bz2 rails-5d3712a81e502f46b2745d238d9bb76fcdb31f5b.zip |
Hack builder to look for fast_xs instead of insisting on its own String#to_xs
Diffstat (limited to 'activesupport/lib/active_support/vendor/builder-2.1.2/builder')
-rw-r--r-- | activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb index 8bdbd05899..a1990be37a 100644 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +++ b/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb @@ -18,7 +18,6 @@ module Builder end if ! defined?(Builder::XChar) - Builder.check_for_name_collision(String, "to_xs") Builder.check_for_name_collision(Fixnum, "xchr") end @@ -105,11 +104,12 @@ end # Enhance the String class with a XML escaped character version of # to_s. # +require 'active_support/core_ext/string/xchar' class String # XML escaped version of to_s def to_xs unpack('U*').map {|n| n.xchr}.join # ASCII, UTF-8 rescue unpack('C*').map {|n| n.xchr}.join # ISO-8859-1, WIN-1252 - end + end unless method_defined?(:to_xs) end |