Sha256: c5568cd9bb9ac2ece66379176a5f992b8356438891a83711c904b7599bceea27

Contents?: true

Size: 407 Bytes

Versions: 2

Compression:

Stored size: 407 Bytes

Contents

begin
  # See http://bogomips.org/fast_xs/ by Eric Wong.
  # Also included with hpricot.
  require 'fast_xs'
rescue LoadError
  # fast_xs extension unavailable
else
  begin
    require 'builder'
  rescue LoadError
    # builder demands the first shot at defining String#to_xs
  end

  class String
    alias_method :original_xs, :to_xs if method_defined?(:to_xs)
    alias_method :to_xs, :fast_xs
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activesupport-3.0.0.beta lib/active_support/core_ext/string/xchar.rb
activesupport-3.0.pre lib/active_support/core_ext/string/xchar.rb