From e0034e3a892aa5ba08833a2fbc515f611baad25c Mon Sep 17 00:00:00 2001 From: Azamat Date: Fri, 11 Jan 2019 11:34:08 -0500 Subject: [PATCH 1/2] Clean up broadcastable definitions --- base/broadcast.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/base/broadcast.jl b/base/broadcast.jl index 194bbd489a515..8dd85622b55e3 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -605,11 +605,9 @@ julia> Broadcast.broadcastable("hello") # Strings break convention of matching i Base.RefValue{String}("hello") ``` """ -broadcastable(x::Union{Symbol,AbstractString,Function,UndefInitializer,Nothing,RoundingMode,Missing,Val}) = Ref(x) -broadcastable(x::Ptr) = Ref(x) +broadcastable(x::Union{Symbol,AbstractString,Function,UndefInitializer,Nothing,RoundingMode,Missing,Val,Ptr,Regex}) = Ref(x) broadcastable(::Type{T}) where {T} = Ref{Type{T}}(T) broadcastable(x::Union{AbstractArray,Number,Ref,Tuple,Broadcasted}) = x -broadcastable(r::Regex) = Ref(r) # Default to collecting iterables — which will error for non-iterables broadcastable(x) = collect(x) broadcastable(::Union{AbstractDict, NamedTuple}) = throw(ArgumentError("broadcasting over dictionaries and `NamedTuple`s is reserved")) From 7d50351d5a88ebc7e0545f68da6d4cb769e608d6 Mon Sep 17 00:00:00 2001 From: AzamatB Date: Fri, 11 Jan 2019 18:33:00 -0500 Subject: [PATCH 2/2] Revert "Merge pull request #1 from JuliaLang/master" This reverts commit 3c12c9cd271d67e698332706f3b971862cfa3ad3.