Please sign in to comment.
Only require builder at startup if we need to monkey with its String#…
- Loading branch information...
Showing with 10 additions and 5 deletions.
|@@ -1,11 +1,18 @@|
|- # See http://bogomips.org/fast_xs/ by Eric Wong|
|+ # See http://bogomips.org/fast_xs/ by Eric Wong.|
|+ # Also included with hpricot.|
|+ # fast_xs extension unavailable|
|+ require 'builder'|
|+ rescue LoadError|
|+ # builder demands the first shot at defining String#to_xs|
|alias_method :original_xs, :to_xs if method_defined?(:to_xs)|
|alias_method :to_xs, :fast_xs|
|- # fast_xs extension unavailable.|