Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
String#to_xs uses the fast_xs extension if available for Builder spee…
…dup. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
- Loading branch information
Showing
10 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
require 'erb' | ||
require 'builder' | ||
|
||
class ERB | ||
module Util | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# Ruby 1.9 introduces BasicObject. Use Builder's BlankSlate before then. | ||
# Ruby 1.9 introduces BasicObject. Use Builder's BlankSlate until then. | ||
unless defined? BasicObject | ||
require 'rubygems' | ||
require 'builder' | ||
require 'builder/blankslate' | ||
BasicObject = Builder::BlankSlate | ||
end |
2 changes: 2 additions & 0 deletions
2
activesupport/lib/active_support/core_ext/array/conversions.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'builder' | ||
|
||
module ActiveSupport #:nodoc: | ||
module CoreExtensions #:nodoc: | ||
module Array #:nodoc: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
begin | ||
require 'fast_xs' | ||
|
||
class String | ||
alias_method :original_xs, :to_xs if method_defined?(:to_xs) | ||
alias_method :to_xs, :fast_xs | ||
end | ||
rescue LoadError | ||
# fast_xs extension unavailable. | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters