aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/marshal.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-03-20 18:09:16 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-03-20 18:09:16 -0300
commitc35ebe17d8b8f3c045dd0e178aedd294aa21edc2 (patch)
tree00affb81ca2fba5b5c896089624187b4a5356319 /activesupport/lib/active_support/core_ext/marshal.rb
parent7815fe4634fcb255583631fa84b50aeeeab0d51e (diff)
parentd5bddc1b2d3d794b2eddcb7309f41f87a8d665c1 (diff)
downloadrails-c35ebe17d8b8f3c045dd0e178aedd294aa21edc2.tar.gz
rails-c35ebe17d8b8f3c045dd0e178aedd294aa21edc2.tar.bz2
rails-c35ebe17d8b8f3c045dd0e178aedd294aa21edc2.zip
Merge pull request #19413 from kirs/replace-alias_method_chain
Replace occurences of alias_method_chain with their Module#prepend counterpart
Diffstat (limited to 'activesupport/lib/active_support/core_ext/marshal.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/marshal.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/core_ext/marshal.rb b/activesupport/lib/active_support/core_ext/marshal.rb
index 56c79c04bd..97e65e89d3 100644
--- a/activesupport/lib/active_support/core_ext/marshal.rb
+++ b/activesupport/lib/active_support/core_ext/marshal.rb
@@ -1,9 +1,7 @@
-require 'active_support/core_ext/module/aliasing'
-
-module Marshal
- class << self
- def load_with_autoloading(source)
- load_without_autoloading(source)
+module ActiveSupport
+ module MarshalWithAutoloading
+ def load(source)
+ super(source)
rescue ArgumentError, NameError => exc
if exc.message.match(%r|undefined class/module (.+)|)
# try loading the class/module
@@ -15,7 +13,7 @@ module Marshal
raise exc
end
end
-
- alias_method_chain :load, :autoloading
end
end
+
+Marshal.singleton_class.prepend(ActiveSupport::MarshalWithAutoloading)