mirror of https://github.com/rails/rails
Merge pull request #33257 from utilum/ruby-warnings
Fix Ruby warnings tickled by the test suite
This commit is contained in:
commit
b3653aee94
|
@ -1,22 +1,23 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "queue_classic"
|
||||
require "active_support/core_ext/module/redefine_method"
|
||||
|
||||
module QC
|
||||
class Queue
|
||||
def enqueue(method, *args)
|
||||
redefine_method(:enqueue) do |method, *args|
|
||||
receiver_str, _, message = method.rpartition(".")
|
||||
receiver = eval(receiver_str)
|
||||
receiver.send(message, *args)
|
||||
end
|
||||
|
||||
def enqueue_in(seconds, method, *args)
|
||||
redefine_method(:enqueue_in) do |seconds, method, *args|
|
||||
receiver_str, _, message = method.rpartition(".")
|
||||
receiver = eval(receiver_str)
|
||||
receiver.send(message, *args)
|
||||
end
|
||||
|
||||
def enqueue_at(not_before, method, *args)
|
||||
redefine_method(:enqueue_at) do |not_before, method, *args|
|
||||
receiver_str, _, message = method.rpartition(".")
|
||||
receiver = eval(receiver_str)
|
||||
receiver.send(message, *args)
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "sneakers"
|
||||
require "active_support/core_ext/module/redefine_method"
|
||||
|
||||
module Sneakers
|
||||
module Worker
|
||||
module ClassMethods
|
||||
def enqueue(msg)
|
||||
redefine_method(:enqueue) do |msg|
|
||||
worker = new(nil, nil, {})
|
||||
worker.work(*msg)
|
||||
end
|
||||
|
|
|
@ -8,5 +8,6 @@ class Visitor
|
|||
|
||||
has_secure_password(validations: false)
|
||||
|
||||
attr_accessor :password_digest, :password_confirmation
|
||||
attr_accessor :password_digest
|
||||
attr_reader :password_confirmation
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue