mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 07:25:30 +02:00
Use Array#intersect? introduced in Ruby 3.1 (#38585).
git-svn-id: https://svn.redmine.org/redmine/trunk@22972 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -100,7 +100,7 @@ module Redmine
|
||||
end
|
||||
|
||||
def position_scope_changed?
|
||||
(saved_changes.keys & self.class.positioned_options[:scope].map(&:to_s)).any?
|
||||
saved_changes.keys.intersect?(self.class.positioned_options[:scope].map(&:to_s))
|
||||
end
|
||||
|
||||
def shift_positions
|
||||
|
||||
@@ -768,7 +768,7 @@ module Redmine
|
||||
children = object.leaf? ? [] : object.children & project_issues(object.project)
|
||||
has_children =
|
||||
children.present? &&
|
||||
(children.collect(&:fixed_version).uniq & [object.fixed_version]).present?
|
||||
children.collect(&:fixed_version).uniq.intersect?([object.fixed_version])
|
||||
when Version
|
||||
tag_options[:id] = "version-#{object.id}"
|
||||
tag_options[:class] = "version-name"
|
||||
|
||||
@@ -103,7 +103,7 @@ module Redmine
|
||||
|
||||
# Returns true if the text formatter supports single section edit
|
||||
def supports_section_edit?
|
||||
(formatter.instance_methods & ['update_section', :update_section]).any?
|
||||
formatter.instance_methods.intersect?(['update_section', :update_section])
|
||||
end
|
||||
|
||||
# Returns a cache key for the given text +format+, +text+, +object+ and +attribute+ or nil if no caching should be done
|
||||
|
||||
Reference in New Issue
Block a user