lib/temping.rb in temping-4.0.0 vs lib/temping.rb in temping-4.1.0

- old
+ new

@@ -83,10 +83,10 @@ def teardown_namespaces @namespaces.select! { |namespace| namespace_still_defined?(namespace) } until @namespaces.empty? namespace, index = @namespaces.each_with_index.max_by { |n, _i| n.name.split("::").length } parts = namespace.name.split("::") - parent = parts.length == 1 ? Object : parts[0...-1].join("::").constantize + parent = (parts.length == 1) ? Object : parts[0...-1].join("::").constantize parent.send(:remove_const, parts.last) if namespace_removable?(namespace, parts, parent) delete_or_trim_in_namespaces(parent, parts, index) end end private :teardown_namespaces