Skip to content

Commit

Permalink
Fix usage of private methods in older rubies.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jan 12, 2019
1 parent 921ff20 commit 67dc2e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/async/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Logger
LEVELS = {debug: 0, info: 1, warn: 2, error: 3, fatal: 4}

LEVELS.each do |name, level|
self.const_set(name.to_s.upcase, level)
const_set(name.to_s.upcase, level)

self.define_method(name) do |*arguments, &block|
define_method(name) do |*arguments, &block|
if level >= @level
self.format(*arguments, &block)
end
Expand Down

0 comments on commit 67dc2e9

Please sign in to comment.