Skip to content

Commit 6746712

Browse files
committed
Fix Builder::XmlMarkup lazy load in Array#to_xml
Followup to e7514dc.
1 parent a0fb2b2 commit 6746712

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

activesupport/lib/active_support/core_ext/array/conversions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def to_formatted_s(format = :default)
181181
# </messages>
182182
#
183183
def to_xml(options = {})
184-
require "active_support/builder" unless defined?(Builder)
184+
require "active_support/builder" unless defined?(Builder::XmlMarkup)
185185

186186
options = options.dup
187187
options[:indent] ||= 2

activesupport/lib/active_support/core_ext/hash/conversions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Hash
7373
# configure your own builder with the <tt>:builder</tt> option. The method also accepts
7474
# options like <tt>:dasherize</tt> and friends, they are forwarded to the builder.
7575
def to_xml(options = {})
76-
require "active_support/builder" unless defined?(Builder) && defined?(Builder::XmlMarkup)
76+
require "active_support/builder" unless defined?(Builder::XmlMarkup)
7777

7878
options = options.dup
7979
options[:indent] ||= 2

0 commit comments

Comments
 (0)