Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/trunk/activesupport/lib/active_support/core_ext/string/xchar.rb

Revision 7773, 203 bytes (checked in by bitsweat, 3 years ago)

String#to_xs uses the fast_xs extension if available for Builder speedup.

Line 
1 begin
2   require 'fast_xs'
3
4   class String
5     alias_method :original_xs, :to_xs if method_defined?(:to_xs)
6     alias_method :to_xs, :fast_xs
7   end
8 rescue LoadError
9   # fast_xs extension unavailable.
10 end
Note: See TracBrowser for help on using the browser.