Skip to content

Commit

Permalink
Use alias_method instead of duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
psparrow committed May 5, 2021
1 parent 38e7e54 commit 7cd06c4
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/bootsnap/load_path_cache/change_observer.rb
Expand Up @@ -15,21 +15,13 @@ def push(*entries)
@lpc_observer.push_paths(self, *entries.map(&:to_s))
super
end

def append(*entries)
@lpc_observer.push_paths(self, *entries.map(&:to_s))
super
end
alias_method :append, :push

def unshift(*entries)
@lpc_observer.unshift_paths(self, *entries.map(&:to_s))
super
end

def prepend(*entries)
@lpc_observer.unshift_paths(self, *entries.map(&:to_s))
super
end
alias_method :prepend, :unshift

def concat(entries)
@lpc_observer.push_paths(self, *entries.map(&:to_s))
Expand Down

0 comments on commit 7cd06c4

Please sign in to comment.