diff options
author | Kir Shatrov <shatrov@me.com> | 2015-03-20 23:23:41 +0200 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2015-03-22 23:11:19 +0200 |
commit | a982a42d766169c2170d7f100c2a5ceb5430efb1 (patch) | |
tree | d0513809ec34dc58732cff47b18f4840ff127ade /activesupport/lib/active_support/core_ext/range/include_range.rb | |
parent | cdbe4fd093a38d9c7c5860138844b7da272556fc (diff) | |
download | rails-a982a42d766169c2170d7f100c2a5ceb5430efb1.tar.gz rails-a982a42d766169c2170d7f100c2a5ceb5430efb1.tar.bz2 rails-a982a42d766169c2170d7f100c2a5ceb5430efb1.zip |
Deprecate alias_method_chain in favour of Module#prepend
…as discussed #19413
Diffstat (limited to 'activesupport/lib/active_support/core_ext/range/include_range.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/range/include_range.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/range/include_range.rb b/activesupport/lib/active_support/core_ext/range/include_range.rb index 3a07401c8a..9d20920dd0 100644 --- a/activesupport/lib/active_support/core_ext/range/include_range.rb +++ b/activesupport/lib/active_support/core_ext/range/include_range.rb @@ -1,5 +1,3 @@ -require 'active_support/core_ext/module/aliasing' - class Range # Extends the default Range#include? to support range comparisons. # (1..5).include?(1..5) # => true @@ -18,6 +16,8 @@ class Range include_without_range?(value) end end - - alias_method_chain :include?, :range + # TODO: change to Module#prepend as soon as the fix is backported to MRI 2.2: + # https://bugs.ruby-lang.org/issues/10847 + alias_method :include_without_range?, :include? + alias_method :include?, :include_with_range? end |