Commit f49e2192 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Resolve Naming/UncommunicativeMethod

parent dab0019e
...@@ -11,8 +11,8 @@ module Network ...@@ -11,8 +11,8 @@ module Network
@parent_spaces = [] @parent_spaces = []
end end
def method_missing(m, *args, &block) def method_missing(msg, *args, &block)
@commit.__send__(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend @commit.__send__(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
end end
def space def space
......
...@@ -469,12 +469,12 @@ class Repository ...@@ -469,12 +469,12 @@ class Repository
expire_branches_cache expire_branches_cache
end end
def method_missing(m, *args, &block) def method_missing(msg, *args, &block)
if m == :lookup && !block_given? if msg == :lookup && !block_given?
lookup_cache[m] ||= {} lookup_cache[msg] ||= {}
lookup_cache[m][args.join(":")] ||= raw_repository.__send__(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend lookup_cache[msg][args.join(":")] ||= raw_repository.__send__(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
else else
raw_repository.__send__(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend raw_repository.__send__(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
end end
end end
......
...@@ -1355,8 +1355,8 @@ class User < ActiveRecord::Base ...@@ -1355,8 +1355,8 @@ class User < ActiveRecord::Base
end end
end end
def self.unique_internal(scope, username, email_pattern, &b) def self.unique_internal(scope, username, email_pattern, &block)
scope.first || create_unique_internal(scope, username, email_pattern, &b) scope.first || create_unique_internal(scope, username, email_pattern, &block)
end end
def self.create_unique_internal(scope, username, email_pattern, &creation_block) def self.create_unique_internal(scope, username, email_pattern, &creation_block)
......
...@@ -10,16 +10,16 @@ module NotificationRecipientService ...@@ -10,16 +10,16 @@ module NotificationRecipientService
NotificationRecipient.new(user, *args).notifiable? NotificationRecipient.new(user, *args).notifiable?
end end
def self.build_recipients(*a) def self.build_recipients(*args)
Builder::Default.new(*a).notification_recipients Builder::Default.new(*args).notification_recipients
end end
def self.build_new_note_recipients(*a) def self.build_new_note_recipients(*args)
Builder::NewNote.new(*a).notification_recipients Builder::NewNote.new(*args).notification_recipients
end end
def self.build_merge_request_unmergeable_recipients(*a) def self.build_merge_request_unmergeable_recipients(*args)
Builder::MergeRequestUnmergeable.new(*a).notification_recipients Builder::MergeRequestUnmergeable.new(*args).notification_recipients
end end
module Builder module Builder
......
...@@ -15,14 +15,14 @@ class EmailReceiverWorker ...@@ -15,14 +15,14 @@ class EmailReceiverWorker
private private
def handle_failure(raw, e) def handle_failure(raw, error)
Rails.logger.warn("Email can not be processed: #{e}\n\n#{raw}") Rails.logger.warn("Email can not be processed: #{error}\n\n#{raw}")
return unless raw.present? return unless raw.present?
can_retry = false can_retry = false
reason = reason =
case e case error
when Gitlab::Email::UnknownIncomingEmail when Gitlab::Email::UnknownIncomingEmail
"We couldn't figure out what the email is for. Please create your issue or comment through the web interface." "We couldn't figure out what the email is for. Please create your issue or comment through the web interface."
when Gitlab::Email::SentNotificationNotFoundError when Gitlab::Email::SentNotificationNotFoundError
...@@ -42,7 +42,7 @@ class EmailReceiverWorker ...@@ -42,7 +42,7 @@ class EmailReceiverWorker
"The thread you are replying to no longer exists, perhaps it was deleted? If you believe this is in error, contact a staff member." "The thread you are replying to no longer exists, perhaps it was deleted? If you believe this is in error, contact a staff member."
when Gitlab::Email::InvalidRecordError when Gitlab::Email::InvalidRecordError
can_retry = true can_retry = true
e.message error.message
end end
if reason if reason
......
...@@ -119,8 +119,8 @@ module DeclarativePolicy ...@@ -119,8 +119,8 @@ module DeclarativePolicy
# a PolicyDsl which is used for registering the rule with # a PolicyDsl which is used for registering the rule with
# this class. PolicyDsl will call back into Base.enable_when, # this class. PolicyDsl will call back into Base.enable_when,
# Base.prevent_when, and Base.prevent_all_when. # Base.prevent_when, and Base.prevent_all_when.
def rule(&b) def rule(&block)
rule = RuleDsl.new(self).instance_eval(&b) rule = RuleDsl.new(self).instance_eval(&block)
PolicyDsl.new(self, rule) PolicyDsl.new(self, rule)
end end
...@@ -222,8 +222,8 @@ module DeclarativePolicy ...@@ -222,8 +222,8 @@ module DeclarativePolicy
# computes the given ability and prints a helpful debugging output # computes the given ability and prints a helpful debugging output
# showing which # showing which
def debug(ability, *a) def debug(ability, *args)
runner(ability).debug(*a) runner(ability).debug(*args)
end end
desc "Unknown user" desc "Unknown user"
...@@ -274,7 +274,7 @@ module DeclarativePolicy ...@@ -274,7 +274,7 @@ module DeclarativePolicy
# #
# NOTE we can't use ||= here because the value might be the # NOTE we can't use ||= here because the value might be the
# boolean `false` # boolean `false`
def cache(key, &b) def cache(key)
return @cache[key] if cached?(key) return @cache[key] if cached?(key)
@cache[key] = yield @cache[key] = yield
......
...@@ -7,10 +7,10 @@ module DeclarativePolicy ...@@ -7,10 +7,10 @@ module DeclarativePolicy
@delegate_name = delegate_name @delegate_name = delegate_name
end end
def method_missing(m, *a, &b) def method_missing(msg, *args)
return super unless a.empty? && !block_given? return super unless args.empty? && !block_given?
@rule_dsl.delegate(@delegate_name, m) @rule_dsl.delegate(@delegate_name, msg)
end end
end end
end end
...@@ -15,8 +15,8 @@ module DeclarativePolicy ...@@ -15,8 +15,8 @@ module DeclarativePolicy
@rule = rule @rule = rule
end end
def policy(&b) def policy(&block)
instance_eval(&b) instance_eval(&block)
end end
def enable(*abilities) def enable(*abilities)
...@@ -31,14 +31,14 @@ module DeclarativePolicy ...@@ -31,14 +31,14 @@ module DeclarativePolicy
@context_class.prevent_all_when(@rule) @context_class.prevent_all_when(@rule)
end end
def method_missing(m, *a, &b) def method_missing(msg, *args, &block)
return super unless @context_class.respond_to?(m) return super unless @context_class.respond_to?(msg)
@context_class.__send__(m, *a, &b) # rubocop:disable GitlabSecurity/PublicSend @context_class.__send__(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
end end
def respond_to_missing?(m) def respond_to_missing?(msg)
@context_class.respond_to?(m) || super @context_class.respond_to?(msg) || super
end end
end end
end end
...@@ -2,7 +2,7 @@ module DeclarativePolicy # rubocop:disable Naming/FileName ...@@ -2,7 +2,7 @@ module DeclarativePolicy # rubocop:disable Naming/FileName
PREFERRED_SCOPE_KEY = :"DeclarativePolicy.preferred_scope" PREFERRED_SCOPE_KEY = :"DeclarativePolicy.preferred_scope"
class << self class << self
def with_preferred_scope(scope, &b) def with_preferred_scope(scope)
Thread.current[PREFERRED_SCOPE_KEY], old_scope = scope, Thread.current[PREFERRED_SCOPE_KEY] Thread.current[PREFERRED_SCOPE_KEY], old_scope = scope, Thread.current[PREFERRED_SCOPE_KEY]
yield yield
ensure ensure
...@@ -13,12 +13,12 @@ module DeclarativePolicy # rubocop:disable Naming/FileName ...@@ -13,12 +13,12 @@ module DeclarativePolicy # rubocop:disable Naming/FileName
Thread.current[PREFERRED_SCOPE_KEY] Thread.current[PREFERRED_SCOPE_KEY]
end end
def user_scope(&b) def user_scope(&block)
with_preferred_scope(:user, &b) with_preferred_scope(:user, &block)
end end
def subject_scope(&b) def subject_scope(&block)
with_preferred_scope(:subject, &b) with_preferred_scope(:subject, &block)
end end
def preferred_scope=(scope) def preferred_scope=(scope)
......
...@@ -8,8 +8,8 @@ module DeclarativePolicy ...@@ -8,8 +8,8 @@ module DeclarativePolicy
# how that affects the actual ability decision - for that, a # how that affects the actual ability decision - for that, a
# `Step` is used. # `Step` is used.
class Base class Base
def self.make(*a) def self.make(*args)
new(*a).simplify new(*args).simplify
end end
# true or false whether this rule passes. # true or false whether this rule passes.
......
...@@ -32,13 +32,13 @@ module DeclarativePolicy ...@@ -32,13 +32,13 @@ module DeclarativePolicy
Rule::DelegatedCondition.new(delegate_name, condition) Rule::DelegatedCondition.new(delegate_name, condition)
end end
def method_missing(m, *a, &b) def method_missing(msg, *args)
return super unless a.empty? && !block_given? return super unless args.empty? && !block_given?
if @context_class.delegations.key?(m) if @context_class.delegations.key?(msg)
DelegateDsl.new(self, m) DelegateDsl.new(self, msg)
else else
cond(m.to_sym) cond(msg.to_sym)
end end
end end
end end
......
...@@ -127,7 +127,7 @@ module DeclarativePolicy ...@@ -127,7 +127,7 @@ module DeclarativePolicy
# #
# For each step, we yield the step object along with the computed score # For each step, we yield the step object along with the computed score
# for debugging purposes. # for debugging purposes.
def steps_by_score(&b) def steps_by_score
flatten_steps! flatten_steps!
if @steps.size > 50 if @steps.size > 50
......
...@@ -29,105 +29,105 @@ module Gitlab ...@@ -29,105 +29,105 @@ module Gitlab
end end
class Converter class Converter
def on_0(s) reset() end def on_0(_) reset() end
def on_1(s) enable(STYLE_SWITCHES[:bold]) end def on_1(_) enable(STYLE_SWITCHES[:bold]) end
def on_3(s) enable(STYLE_SWITCHES[:italic]) end def on_3(_) enable(STYLE_SWITCHES[:italic]) end
def on_4(s) enable(STYLE_SWITCHES[:underline]) end def on_4(_) enable(STYLE_SWITCHES[:underline]) end
def on_8(s) enable(STYLE_SWITCHES[:conceal]) end def on_8(_) enable(STYLE_SWITCHES[:conceal]) end
def on_9(s) enable(STYLE_SWITCHES[:cross]) end def on_9(_) enable(STYLE_SWITCHES[:cross]) end
def on_21(s) disable(STYLE_SWITCHES[:bold]) end def on_21(_) disable(STYLE_SWITCHES[:bold]) end
def on_22(s) disable(STYLE_SWITCHES[:bold]) end def on_22(_) disable(STYLE_SWITCHES[:bold]) end
def on_23(s) disable(STYLE_SWITCHES[:italic]) end def on_23(_) disable(STYLE_SWITCHES[:italic]) end
def on_24(s) disable(STYLE_SWITCHES[:underline]) end def on_24(_) disable(STYLE_SWITCHES[:underline]) end
def on_28(s) disable(STYLE_SWITCHES[:conceal]) end def on_28(_) disable(STYLE_SWITCHES[:conceal]) end
def on_29(s) disable(STYLE_SWITCHES[:cross]) end def on_29(_) disable(STYLE_SWITCHES[:cross]) end
def on_30(s) set_fg_color(0) end def on_30(_) set_fg_color(0) end
def on_31(s) set_fg_color(1) end def on_31(_) set_fg_color(1) end
def on_32(s) set_fg_color(2) end def on_32(_) set_fg_color(2) end
def on_33(s) set_fg_color(3) end def on_33(_) set_fg_color(3) end
def on_34(s) set_fg_color(4) end def on_34(_) set_fg_color(4) end
def on_35(s) set_fg_color(5) end def on_35(_) set_fg_color(5) end
def on_36(s) set_fg_color(6) end def on_36(_) set_fg_color(6) end
def on_37(s) set_fg_color(7) end def on_37(_) set_fg_color(7) end
def on_38(s) set_fg_color_256(s) end def on_38(stack) set_fg_color_256(stack) end
def on_39(s) set_fg_color(9) end def on_39(_) set_fg_color(9) end
def on_40(s) set_bg_color(0) end def on_40(_) set_bg_color(0) end
def on_41(s) set_bg_color(1) end def on_41(_) set_bg_color(1) end
def on_42(s) set_bg_color(2) end def on_42(_) set_bg_color(2) end
def on_43(s) set_bg_color(3) end def on_43(_) set_bg_color(3) end
def on_44(s) set_bg_color(4) end def on_44(_) set_bg_color(4) end
def on_45(s) set_bg_color(5) end def on_45(_) set_bg_color(5) end
def on_46(s) set_bg_color(6) end def on_46(_) set_bg_color(6) end
def on_47(s) set_bg_color(7) end def on_47(_) set_bg_color(7) end
def on_48(s) set_bg_color_256(s) end def on_48(stack) set_bg_color_256(stack) end
def on_49(s) set_bg_color(9) end def on_49(_) set_bg_color(9) end
def on_90(s) set_fg_color(0, 'l') end def on_90(_) set_fg_color(0, 'l') end
def on_91(s) set_fg_color(1, 'l') end def on_91(_) set_fg_color(1, 'l') end
def on_92(s) set_fg_color(2, 'l') end def on_92(_) set_fg_color(2, 'l') end
def on_93(s) set_fg_color(3, 'l') end def on_93(_) set_fg_color(3, 'l') end
def on_94(s) set_fg_color(4, 'l') end def on_94(_) set_fg_color(4, 'l') end
def on_95(s) set_fg_color(5, 'l') end def on_95(_) set_fg_color(5, 'l') end
def on_96(s) set_fg_color(6, 'l') end def on_96(_) set_fg_color(6, 'l') end
def on_97(s) set_fg_color(7, 'l') end def on_97(_) set_fg_color(7, 'l') end
def on_99(s) set_fg_color(9, 'l') end def on_99(_) set_fg_color(9, 'l') end
def on_100(s) set_bg_color(0, 'l') end def on_100(_) set_bg_color(0, 'l') end
def on_101(s) set_bg_color(1, 'l') end def on_101(_) set_bg_color(1, 'l') end
def on_102(s) set_bg_color(2, 'l') end def on_102(_) set_bg_color(2, 'l') end
def on_103(s) set_bg_color(3, 'l') end def on_103(_) set_bg_color(3, 'l') end
def on_104(s) set_bg_color(4, 'l') end def on_104(_) set_bg_color(4, 'l') end
def on_105(s) set_bg_color(5, 'l') end def on_105(_) set_bg_color(5, 'l') end
def on_106(s) set_bg_color(6, 'l') end def on_106(_) set_bg_color(6, 'l') end
def on_107(s) set_bg_color(7, 'l') end def on_107(_) set_bg_color(7, 'l') end
def on_109(s) set_bg_color(9, 'l') end def on_109(_) set_bg_color(9, 'l') end
attr_accessor :offset, :n_open_tags, :fg_color, :bg_color, :style_mask attr_accessor :offset, :n_open_tags, :fg_color, :bg_color, :style_mask
...@@ -188,19 +188,19 @@ module Gitlab ...@@ -188,19 +188,19 @@ module Gitlab
) )
end end
def handle_section(s) def handle_section(scanner)
action = s[1] action = scanner[1]
timestamp = s[2] timestamp = scanner[2]
section = s[3] section = scanner[3]
line = s.matched()[0...-5] # strips \r\033[0K line = scanner.matched()[0...-5] # strips \r\033[0K
@out << %{<div class="hidden" data-action="#{action}" data-timestamp="#{timestamp}" data-section="#{section}">#{line}</div>} @out << %{<div class="hidden" data-action="#{action}" data-timestamp="#{timestamp}" data-section="#{section}">#{line}</div>}
end end
def handle_sequence(s) def handle_sequence(scanner)
indicator = s[1] indicator = scanner[1]
commands = s[2].split ';' commands = scanner[2].split ';'
terminator = s[3] terminator = scanner[3]
# We are only interested in color and text style changes - triggered by # We are only interested in color and text style changes - triggered by
# sequences starting with '\e[' and ending with 'm'. Any other control # sequences starting with '\e[' and ending with 'm'. Any other control
......
...@@ -75,19 +75,19 @@ module Gitlab ...@@ -75,19 +75,19 @@ module Gitlab
@beginning_of_section_regex ||= /section_/.freeze @beginning_of_section_regex ||= /section_/.freeze
end end
def find_next_marker(s) def find_next_marker(scanner)
beginning_of_section_len = 8 beginning_of_section_len = 8
maybe_marker = s.exist?(beginning_of_section_regex) maybe_marker = scanner.exist?(beginning_of_section_regex)
if maybe_marker.nil? if maybe_marker.nil?
s.terminate scanner.terminate
else else
# repositioning at the beginning of the match # repositioning at the beginning of the match
s.pos += maybe_marker - beginning_of_section_len scanner.pos += maybe_marker - beginning_of_section_len
if block_given? if block_given?
good_marker = yield(s) good_marker = yield(scanner)
# if not a good marker: Consuming the matched beginning_of_section_regex # if not a good marker: Consuming the matched beginning_of_section_regex
s.pos += beginning_of_section_len unless good_marker scanner.pos += beginning_of_section_len unless good_marker
end end
end end
end end
......
...@@ -3,11 +3,11 @@ module Gitlab ...@@ -3,11 +3,11 @@ module Gitlab
class ImagePoint class ImagePoint
attr_reader :width, :height, :x, :y attr_reader :width, :height, :x, :y
def initialize(width, height, x, y) def initialize(width, height, new_x, new_y)
@width = width @width = width
@height = height @height = height
@x = x @x = new_x
@y = y @y = new_y
end end
def to_h def to_h
......
...@@ -93,7 +93,7 @@ module Gitlab ...@@ -93,7 +93,7 @@ module Gitlab
private private
def longest_common_prefix(a, b) def longest_common_prefix(a, b) # rubocop:disable Naming/UncommunicativeMethodParamName
max_length = [a.length, b.length].max max_length = [a.length, b.length].max
length = 0 length = 0
...@@ -109,7 +109,7 @@ module Gitlab ...@@ -109,7 +109,7 @@ module Gitlab
length length
end end
def longest_common_suffix(a, b) def longest_common_suffix(a, b) # rubocop:disable Naming/UncommunicativeMethodParamName
longest_common_prefix(a.reverse, b.reverse) longest_common_prefix(a.reverse, b.reverse)
end end
end end
......
...@@ -68,14 +68,14 @@ module Gitlab ...@@ -68,14 +68,14 @@ module Gitlab
nil nil
end end
def encode_binary(s) def encode_binary(str)
return "" if s.nil? return "" if str.nil?
s.dup.force_encoding(Encoding::ASCII_8BIT) str.dup.force_encoding(Encoding::ASCII_8BIT)
end end
def binary_stringio(s) def binary_stringio(str)
StringIO.new(s || '').tap { |io| io.set_encoding(Encoding::ASCII_8BIT) } StringIO.new(str || '').tap { |io| io.set_encoding(Encoding::ASCII_8BIT) }
end end
private private
......
...@@ -191,19 +191,19 @@ module Gitlab ...@@ -191,19 +191,19 @@ module Gitlab
end end
end end
def linkify_issues(s) def linkify_issues(str)
s = s.gsub(/([Ii]ssue) ([0-9]+)/, '\1 #\2') str = str.gsub(/([Ii]ssue) ([0-9]+)/, '\1 #\2')
s = s.gsub(/([Cc]ase) ([0-9]+)/, '\1 #\2') str = str.gsub(/([Cc]ase) ([0-9]+)/, '\1 #\2')
s str
end end
def escape_for_markdown(s) def escape_for_markdown(str)
s = s.gsub(/^#/, "\\#") str = str.gsub(/^#/, "\\#")
s = s.gsub(/^-/, "\\-") str = str.gsub(/^-/, "\\-")
s = s.gsub("`", "\\~") str = str.gsub("`", "\\~")
s = s.delete("\r") str = str.delete("\r")
s = s.gsub("\n", " \n") str = str.gsub("\n", " \n")
s str
end end
def format_content(raw_content) def format_content(raw_content)
......
...@@ -401,8 +401,8 @@ module Gitlab ...@@ -401,8 +401,8 @@ module Gitlab
path.read.chomp path.read.chomp
end end
def self.timestamp(t) def self.timestamp(time)
Google::Protobuf::Timestamp.new(seconds: t.to_i) Google::Protobuf::Timestamp.new(seconds: time.to_i)
end end
# The default timeout on all Gitaly calls # The default timeout on all Gitaly calls
......
...@@ -399,8 +399,8 @@ module Gitlab ...@@ -399,8 +399,8 @@ module Gitlab
end end
end end
def encode_repeated(a) def encode_repeated(array)
Google::Protobuf::RepeatedField.new(:bytes, a.map { |s| encode_binary(s) } ) Google::Protobuf::RepeatedField.new(:bytes, array.map { |s| encode_binary(s) } )
end end
def call_find_commit(revision) def call_find_commit(revision)
......
...@@ -60,8 +60,8 @@ module Gitlab ...@@ -60,8 +60,8 @@ module Gitlab
private private
def method_missing(m, *args, &block) def method_missing(msg, *args, &block)
@hash.public_send(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend @hash.public_send(msg, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
end end
end end
end end
......
...@@ -200,27 +200,27 @@ module Gitlab ...@@ -200,27 +200,27 @@ module Gitlab
"Status: #{name}" "Status: #{name}"
end end
def linkify_issues(s) def linkify_issues(str)
s = s.gsub(/([Ii]ssue) ([0-9]+)/, '\1 #\2') str = str.gsub(/([Ii]ssue) ([0-9]+)/, '\1 #\2')
s = s.gsub(/([Cc]omment) #([0-9]+)/, '\1 \2') str = str.gsub(/([Cc]omment) #([0-9]+)/, '\1 \2')
s str
end end
def escape_for_markdown(s) def escape_for_markdown(str)
# No headings and lists # No headings and lists
s = s.gsub(/^#/, "\\#") str = str.gsub(/^#/, "\\#")
s = s.gsub(/^-/, "\\-") str = str.gsub(/^-/, "\\-")
# No inline code # No inline code
s = s.gsub("`", "\\`") str = str.gsub("`", "\\`")
# Carriage returns make me sad # Carriage returns make me sad
s = s.delete("\r") str = str.delete("\r")
# Markdown ignores single newlines, but we need them as <br />. # Markdown ignores single newlines, but we need them as <br />.
s = s.gsub("\n", " \n") str = str.gsub("\n", " \n")
s str
end end
def create_label(name) def create_label(name)
......
...@@ -11,7 +11,7 @@ module Rouge ...@@ -11,7 +11,7 @@ module Rouge
@tag = tag @tag = tag
end end
def stream(tokens, &b) def stream(tokens)
is_first = true is_first = true
token_lines(tokens) do |line| token_lines(tokens) do |line|
yield "\n" unless is_first yield "\n" unless is_first
......
...@@ -175,7 +175,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do ...@@ -175,7 +175,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do
end end
end end
def tr(s) def tr(str)
s.delete("'") str.delete("'")
end end
end end
...@@ -24,7 +24,7 @@ module Spec ...@@ -24,7 +24,7 @@ module Spec
private private
# Encodes an openssh-mpi-encoded integer. # Encodes an openssh-mpi-encoded integer.
def encode_mpi(n) def encode_mpi(n) # rubocop:disable Naming/UncommunicativeMethodParamName
chars, n = [], n.to_i chars, n = [], n.to_i
chars << (n & 0xff) && n >>= 8 while n != 0 chars << (n & 0xff) && n >>= 8 while n != 0
chars << 0 if chars.empty? || chars.last >= 0x80 chars << 0 if chars.empty? || chars.last >= 0x80
......
...@@ -18,8 +18,8 @@ describe WaitableWorker do ...@@ -18,8 +18,8 @@ describe WaitableWorker do
def self.bulk_perform_inline(args_list) def self.bulk_perform_inline(args_list)
end end
def perform(i = 0) def perform(count = 0)
self.class.counter += i self.class.counter += count
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment