Skip to content

Commit f2f7bcc

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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy