Skip to content

Commit

Permalink
Use alias instead of alias_method
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jan 19, 2016
1 parent 86106fc commit 239bbcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/t/core_ext/string.rb
Expand Up @@ -7,7 +7,7 @@ def strip_ats
tr('@', '')
end

alias_method :old_to_i, :to_i
alias old_to_i to_i

def to_i(base = 10)
tr(',', '').old_to_i(base)
Expand Down
4 changes: 2 additions & 2 deletions lib/t/utils.rb
Expand Up @@ -44,8 +44,8 @@ def distance_of_time_in_words(from_time, to_time = Time.now) # rubocop:disable C
format('%d years', (minutes.to_f / 525_600.0).round)
end
end
alias_method :time_ago_in_words, :distance_of_time_in_words
alias_method :time_from_now_in_words, :distance_of_time_in_words
alias time_ago_in_words distance_of_time_in_words
alias time_from_now_in_words distance_of_time_in_words

def fetch_users(users, options)
format_users!(users, options)
Expand Down

0 comments on commit 239bbcb

Please sign in to comment.