Project

General

Profile

Patch #33244 » tracker.rb.patch

Pavel Rosický, 2020-04-02 23:25

View differences:

trunk/app/models/tracker.rb (revision 19640) → trunk/app/models/tracker.rb (working copy)
98 98

  
99 99
  def disabled_core_fields
100 100
    i = -1
101
    @disabled_core_fields ||= CORE_FIELDS.select { i += 1; (fields_bits || 0) & (2 ** i) != 0}
101
    @disabled_core_fields ||= CORE_FIELDS.select { i += 1; (fields_bits || 0) & (1 << i) != 0}
102 102
  end
103 103

  
104 104
  def core_fields
......
111 111
    bits = 0
112 112
    CORE_FIELDS.each_with_index do |field, i|
113 113
      unless fields.include?(field)
114
        bits |= 2 ** i
114
        bits |= 1 << i
115 115
      end
116 116
    end
117 117
    self.fields_bits = bits
    (1-1/1)